Cannot find spring-boot-starter-oauth2-client no matter the version

  Kiến thức lập trình

I am trying to import the spring-boot-start-oauth2-client into my pom.xml. I have tried using different versions and no matter which version I use, this error pops up:

Dependency 'org.springframework.boot:spring-boot-starter-oauth2-client:3.3.1' not found

Keep in mind the 3.3.1 changes into different versions depending on what version I put. This is the specific part of my pom.xml(let me know if you want the whole file):

<dependencies>
        <!-- Spring Boot Starter dependencies -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Micrometer core -->
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
            <version>1.13.1</version> <!-- Adjust version as per availability -->
        </dependency>

        <!-- Lombok for easier Java development -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

The error is happening at this specific part of the above file:

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-client</artifactId>
        </dependency>

I have also tried using the dependencyManagement tool and that gets rid of the error but when I run the code it gives me this error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityFilterChain' defined in class path resource 

and

java.lang.NoClassDefFoundError: org/springframework/security/oauth2/client/web/OAuth2LoginAuthenticationFilter

Any help is much appreciated! Thank you in advance!

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT