So I've been trying to implement oAuth2 in a simple Spring MVC app.
In the guide I was following, in their AuthorizationServerConfigurerAdapter
they @Autowired
an AuthenticationManager
. They used Spring Boot version 1.5.2.
I wanted to use Spring Boot 2.0.0 as this is the latest version so I wanted to learn the latest practices. However, in my pom.xml when I change:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
to:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
All of a sudden, I can't autowire AuthenticationManager
.
Could not autowire. No beans of 'AuthenticationManager' type found.
Could someone come up with a solution to this?
Thanks!