IDEA运行SSM项目时,出现问题:
Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/json/JsonMapper
原因:
项目引入的JSON依赖版本为:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.0</version>
</dependency>
版本低了,改为高版本即可:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.3</version>
</dependency>