Spring OAuth2资源服务器的Java配置
我目前有一个通过Spring OAuth2资源服务器的Java配置,java,spring,spring-security-oauth2,Java,Spring,Spring Security Oauth2,我目前有一个通过application.yml文件配置的资源服务器。该文件包含: security: oauth2: client: client-id: foo-client client-secret: bar access-token-uri: http://localhost:9999/uaa/oauth/token user-authorization-uri: http://localhost:9999/uaa/oauth/
application.yml
文件配置的资源服务器。该文件包含:
security:
oauth2:
client:
client-id: foo-client
client-secret: bar
access-token-uri: http://localhost:9999/uaa/oauth/token
user-authorization-uri: http://localhost:9999/uaa/oauth/authorize
resource:
user-info-uri: http://localhost:9999/uaa/user
token-info-uri: http://localhost:9999/uaa/oauth/check_token
有人能提供一个通过Spring的Java配置配置的例子吗?我很难找到例子。我实际上是在寻找与你的问题相同的东西。我只是好奇它是如何完成的,而不是需要去做。不管怎样,在进行了一点挖掘之后,我去了the,看看是否有任何信息,并查看了和API,找到了两者中的设置。我假设您使用一些配置文件中的设置创建了一个bean,它应该像其他任何东西一样工作 我希望这能帮助你朝着正确的方向前进