摘要: 1、配置web.xml 2、配置springmvc-servlet.xml 3、编写index.jsp 4、编写handler.java 5、编写hello.jsp 6、配置国际化文件 messages_zh_CN.properties、messages_en_US.properties、messa 阅读全文
posted @ 2017-05-27 18:30 奋斗的少年WH 阅读(317) 评论(0) 推荐(0)
摘要: 1、导入jar包 jack-core-asl-1.9.11.jar jack-mapper-asl-1.9.11.jar 2、配置springmvc-servlet.xml文件 3、编写javascript的ajax和后台springmvc的控制器 handler.java 遍历map集合的参考地址 阅读全文
posted @ 2017-05-27 16:34 奋斗的少年WH 阅读(283) 评论(0) 推荐(0)
摘要: 参考来源:http://blog.csdn.net/dangerous_fire/article/details/25904225 第一种解决方法,适用所有情况 因为在controller中返回json用了@ResponseBody,而spring源码中@ResponseBody 的实现类发现其默认 阅读全文
posted @ 2017-05-27 14:03 奋斗的少年WH 阅读(187) 评论(0) 推荐(0)
摘要: 参考来源:http://blog.csdn.net/qq924862077/article/details/54286976?utm_source=gold_browser_extension RequestToViewNameTranslator可以在处理器返回的View为空时使用它根据Reque 阅读全文
posted @ 2017-05-27 11:08 奋斗的少年WH 阅读(265) 评论(0) 推荐(0)
摘要: package com.wh.handler; /** * @ModelAttribute绑定请求参数到命令对象 * @ModelAttribute一个具有如下三个作用: * * ①绑定请求参数到命令对象:放在功能处理方法的入参上时,用于将多个请求参数绑定到一个命令对象, * 从而简化绑定流程,而且自动暴露为模型数据用于视图页面展示时使用; * * ②暴露表单引用对象为模型数据... 阅读全文
posted @ 2017-05-27 09:40 奋斗的少年WH 阅读(423) 评论(0) 推荐(0)
摘要: userid2 pathvariable 阅读全文
posted @ 2017-05-27 09:28 奋斗的少年WH 阅读(1374) 评论(0) 推荐(0)