2

I'am trying to add jwt in pom.xml but jwt dependency is not available.

Is there anyone who has the same experience?

I'm going to use Jwtbuilder for security settings.

Springboot is 2.2.6 and I'am using Maven.

<modelVersion>4.0.0</modelVersion>
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.6.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>co.kr.hatchfly</groupId>
<artifactId>hf</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>hf</name>
<description>hatchfly home</description>

<properties>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
    </dependency>
    <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt</artifactId>
        <version>0.9.1</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

enter image description here

Dharman
  • 30,962
  • 25
  • 85
  • 135
user13104402
  • 21
  • 1
  • 2

1 Answers1

10

I was facing something like "dependency io.jsonwebtoken::jjwt:0.9.1 not found" when I added io.jsonwebtoken dependency same with your case.

For me: loading maven dependencies (ctrl+shift+o for intellij idea) solved the problem.

pserimer
  • 233
  • 4
  • 8