Spring Boot 项目上 jjwt(json Web 令牌)的 Maven 依赖项

ali*_*lia 0 maven jwt spring-boot jjwt

我应该在 pom.xml 中添加哪个 Maven 依赖项来解决这些错误: -SignatureException 无法解析为类型 -ExpiredJwtException 无法解析为类型 -UnsupportedJwtException 无法解析为类型

ali*_*lia 6

我通过在 pom.xml 中添加这些依赖项解决了这个问题:

<dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>0.11.5</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>0.11.5</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId>
            <version>0.11.5</version>
      </dependency>
Run Code Online (Sandbox Code Playgroud)