Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring security oauth2 'dependencies.dependency.version' is missing for spring boot 2.0.3

I try to add dependency of spring security. This is my pom.xml

<properties>        
    <spring-boot.version>2.0.3.RELEASE</spring-boot.version>
</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>${spring-boot.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<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>
    ...
<dependencies>

I try with artifactId spring-security-oauth2, it said: 'dependencies.dependency.version' for org.springframework.security.oauth:spring-security-oauth2:jar is missing

but with spring 1.4.2.RELEASE, It work. What is the new spring security oauth2 maven repo for springboot 2.0.3.RELEASE? (without element) Thanks

like image 494
Loc Le Avatar asked Jul 28 '18 10:07

Loc Le


1 Answers

Error saying that you haven't defined version for spring-security-oauth2

You can use 2.3.3 version

    <dependency>
        <groupId>org.springframework.security.oauth</groupId>
        <artifactId>spring-security-oauth2</artifactId>
        <version>2.3.3.RELEASE</version>
    </dependency>
like image 72
Kathirvel Subramanian Avatar answered Nov 15 '22 23:11

Kathirvel Subramanian