找不到com.fasterxml.jackson.core.JsonParseException的类文件
我的项目使用Spring MVC作为前端,使用EJB作为后端。 当我使用jackson序列化和反序列化控制器级别的json字符串下面的代码正常工作但服务层它给出了一个错误“ com.fasterxml.jackson.core.JsonParseException找不到的类文件 ”
ObjectMapper mapper = new ObjectMapper(); Object convertedObject = mapper.readValue(jsonString, class);
我的模块pom文件包含依赖项。
com.fasterxml.jackson.core jackson-annotations 2.3.0
创建对象后,此错误与mapper
出现。
错误: Error:(247, 67) java: cannot access com.fasterxml.jackson.core.JsonParseException class file for com.fasterxml.jackson.core.JsonParseException not found
你还需要包括
com.fasterxml.jackson.core jackson-core 2.3.2