【发布时间】:2018-08-27 03:53:38
【问题描述】:
所以我一直在尝试在一个简单的 Spring MVC 应用程序中实现 oAuth2。
在我关注的指南中,在他们的AuthorizationServerConfigurerAdapter 他们@Autowired 和AuthenticationManager。他们使用 Spring Boot 1.5.2 版。
我想使用 Spring Boot 2.0.0,因为这是最新版本,所以我想学习最新的实践。但是,当我更改时,在我的 pom.xml 中:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
到:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
突然之间,我无法自动连接AuthenticationManager。
Could not autowire. No beans of 'AuthenticationManager' type found.
有人能想出解决办法吗?
谢谢!
【问题讨论】:
-
没有可用的解决方案。
标签: java spring-mvc spring-boot spring-security oauth-2.0