有没有人试图成功地将一个springboot应用程序部署到wildfly 10?我找了一些例子,但我只找到了野生蝇8.2
这是我的应用程序类:
@SpringBootApplication
@EnableEurekaServer
@EnableDiscoveryClient
public class ServereurekaApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(ServereurekaApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(ServereurekaApplication.class);
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的POM
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.servereureka</groupId>
<artifactId>servereureka</artifactId>
<version>1</version>
<packaging>war</packaging>
<name>servereureka</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> …
Run Code Online (Sandbox Code Playgroud) OpenID Connect 上的 Keycloak 文档指出
访问令牌由领域进行数字签名,并包含应用程序可用于确定允许用户访问应用程序上的哪些资源的访问信息(如用户角色映射)。
是否可以从 Keycloak 认证后返回的访问令牌中确定允许用户访问哪些资源?按照keycloak 快速入门关于获取 OAuth2 访问令牌的说明,我得到以下 JWT(省略了不相关的字段):
{
"aud": "app-authz-springboot",
"sub": "9c6c4a66-bb14-420f-a8af-3b2771266b38",
"typ": "Bearer",
"azp": "app-authz-springboot",
"realm_access": {
"roles": [
"user"
]
},
"resource_access": {},
"preferred_username": "alice"
}
Run Code Online (Sandbox Code Playgroud)
有一块空地
资源访问
有没有办法用用户有权访问的资源填充它?这个领域的规范是什么?在JWT RFC或OpenID Connect Spec 中找不到它
我尝试了另一种有效的方法:
将获得的令牌交换为 rpt,稍加修改添加response_mode参数:
curl -v -X POST \
http://localhost:8180/auth/realms/spring-boot-quickstart/protocol/openid-connect/token \
-H "Authorization: Bearer "$access_token \
--data "grant_type=urn:ietf:params:oauth:grant-type:uma-ticket" \
--data "audience=app-authz-rest-springboot" \
--data "permission=Default Resource"
--data …
Run Code Online (Sandbox Code Playgroud)我已经定义了一个Web服务,它将从我的mysql数据库中返回数据.
我用php编写了web服务.
现在我已经定义了一个复杂类型如下:
$server->wsdl->addComplexType(
'Category',
'complexType',
'struct',
'all',
'',
array(
'category_parent_id' => array('name' => 'category_parent_id', 'type' => 'xsd:int'),
'category_child_id' => array('name' => 'category_child_id', 'type' => 'xsd:int'),
'category_list' => array('name' => 'category_list', 'type' => 'xsd:int')
)
Run Code Online (Sandbox Code Playgroud)
);
上面的复杂类型是我数据库中表中的一行.
现在我的函数必须发送这些行的数组,所以我如何实现相同的
我的代码如下:
require_once('./nusoap/nusoap.php');
$server = new soap_server;
$server->configureWSDL('productwsdl', 'urn:productwsdl');
// Register the data structures used by the service
$server->wsdl->addComplexType(
'Category',
'complexType',
'struct',
'all',
'',
array(
'category_parent_id' => array('name' => 'category_parent_id', 'type' => 'xsd:int'),
'category_child_id' => array('name' => 'category_child_id', 'type' => 'xsd:int'),
'category_list' => …
Run Code Online (Sandbox Code Playgroud)