我已经在 Spring 5 和 Spring boot 2.0.0.M3 中构建了身份验证服务和 Web 应用程序,我正在尝试将其移植到Spring boot 2.0.0.M6
now.
我注意到@EnableOauth2Sso
不再可用spring-boot-autoconfigure
;我使用这个注释来配置我的网络应用程序spring boot 2.0.0.M3
时尚。我已经研究过的例子Spring
用于配置Oauth2 Client
using @EnableOAuth2Client
但示例中使用的配置对象如UserInfoTokenServices
也似乎不再存在了。
如何配置我的客户端 Web 应用程序OAuth2 in spring boot versions >= 2.0.0.M6
?
Spring Boot 上现有的 GitHub 问题 https://github.com/spring-projects/spring-boot/issues/11032#issuecomment-372100443,经过详细阐述,最终引导我找到了该注释在 2.0.0 版本中的位置。它已被转移到一个对于 2.0.0 版本工件来说全新的项目。
要解决此问题并迁移您的项目,请添加工件org.springframework.security.oauth.boot:spring-security-oauth2-自动配置 https://mvnrepository.com/artifact/org.springframework.security.oauth.boot/spring-security-oauth2-autoconfigure到您的依赖管理配置:
<dependency>
<groupId>org.springframework.security.oauth.boot</groupId>
<artifactId>spring-security-oauth2-autoconfigure</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)