我继承了一个在POM.xml中具有此功能的java项目:
<properties>
<jjwt.version>0.11.1</jjwt.version>
</properties>
// from https://github.com/jwtk/jjwt#maven
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>${jjwt.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>${jjwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId> <!-- or jjwt-gson if Gson is preferred -->
<version>${jjwt.version}</version>
<scope>runtime</scope>
</dependency>
// what is this "jjwt" dep, and why might it be using a different version?
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>这是什么"jjwt“dep,为什么它会使用不同的版本?
我在https://github.com/jwtk/jjwt没有看到任何关于这件事的提及
发布于 2020-08-10 19:39:03
在JJWT版本0.10.0之前,API和实现都打包为一个单独的工件,即io.jsonwebtoken:jjwt。
从0.10.0版本开始,API和实现被分割到两个不同的工件中。
JJWT的新模块化设计利用了编译和运行时依赖之间的区别,以确保您只依赖于应用程序中安全使用的公共API。所有内部/私有实现类都已移动到新的jjwt impl运行时依赖项。 如果您过去依赖于任何内部实现类,那么您有两个选择:
我猜您的项目团队只是没有完成从JJWT <= 0.9到JJWT >= 0.10的升级。
https://stackoverflow.com/questions/63346655
复制相似问题