在SpringMVC的Controller类中,
获取jsp页面中的json串,
jsp页面中的json转递方式是key/value,
Controller类中使用_@ResponseBody_来转换成json串返回给页面
JSP页面:
Controller类:
pojo对象类:
有关的jar包,太多了:
配置文件:
控制台报错500:
DEBUG [http-nio-8080-exec-4] - POST "/springmvc_mybatis/testJson.action", parameters={masked}
DEBUG [http-nio-8080-exec-4] - Mapped to public cn.lzq.ssm.controller.Test1 cn.lzq.ssm.controller.JsonTest.testJson(cn.lzq.ssm.controller.Test1)
** WARN [http-nio-8080-exec-4]** - Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type: class cn.lzq.ssm.controller.Test1]
DEBUG [http-nio-8080-exec-4] - Completed 500 INTERNAL_SERVER_ERROR