java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonKey
当我进行图片上传功能时,遇到了这个问题
原因是jar包的问题,如上述所说就是jackson的包的问题,不是没有依赖就是,依赖冲突。
原先我也引进了jackson的依赖,但是没用
最后使用了最新版的jackson依赖才成功
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.12.1</version>
</dependency>
这个问题也是稀里糊涂的,搞了蛮久,依赖冲突问题也是一直难受的要死。
算是装运气搞定了。