I am using spring boot with parent
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.M7</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
I want to include spring security in my project . Hence I included following dependencies.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
</dependency>
but problem is when I annotate spring boot application with @EnableResourceServer, It is not detecting annotation.
I put version and it works
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.3.3.RELEASE</version>
</dependency>
No an expert in Maven, but would be thankeful if someone can explain that.
Thanks for your comment!
@AntonyBaasan @EnableResourceServer feature was moved to separate library in later version
Not explicitly mentioning the version makes maven pick the latest compatible version
Found the annotation under oauth2 starter
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-oauth2</artifactId>
</dependency>
Most helpful comment
I put version and it works
No an expert in Maven, but would be thankeful if someone can explain that.