spring mvc json jar 包
jackson-annotations-2.9.10.jar
jackson-databind-2.9.10.jar
<mvc:annotation-driven/> <context:component-scan base-package="com.cjy.module" /> <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> <property name="messageConverters"> <list> <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/> </list> </property> </bean> <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" /> <bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter" />