Debug an SSM project built by Maven, and convert it from backend to front-end to json. The following error is reported:

 exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException

 Json conversion error: No converter found for return value of type

terms of settlement: The online tycoon said it was a json conversion error, so you need to add dependencies, configure the spring mvc configuration file, and restart the server!

Pom.xml Add Dependency:

 <properties> <jackson.version>2.5.4</jackson.version> </properties>  <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>${jackson.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> </dependency>

Add the following configuration to the springmvc configuration file:

 <mvc:annotation-driven> <mvc:message-converters> <bean class="org.springframework.http.converter.StringHttpMessageConverter"/> <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/> </mvc:message-converters> </mvc:annotation-driven>

Restart the project to test:
 Json conversion error: No converter found for return value of type