修改浏览器accept使支持@ResponseBody
摘要:原始:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 application/json,text/javascript,text/html,application/xhtml,application/xml;q=0.9,
阅读全文
posted @
2016-04-29 15:24
Simle
阅读(398)
推荐(0) 编辑
[六]SpringMvc学习-文件上传
摘要:1.单文件上传 1.1修改配置文件 1.2添加两个jar包 com.springsource.org.apache.commons.fileupload-1.2.0.jar com.springsource.org.apache.common...
阅读全文
posted @
2016-01-12 22:56
Simle
阅读(197)
推荐(0) 编辑
[五]SpringMvc学习-Restful风格实现
摘要:1.Restful风格的资源URL 无后缀资源的访问(csdn用法)2.SpringMvc对Rest风格的支持 2.1将 /*.do改为/ 2.23.@PathVariable获取Url变量 @RequestMapping("/details/{id}") public String li...
阅读全文
posted @
2016-01-12 22:34
Simle
阅读(244)
推荐(0) 编辑
[四]SpringMvc学习-对servlet与json的支持与实现
摘要:1.对servletAPI的支持 request、response、session作为参数自动注入2.对Json的支持 2.1springmvc配置文件中添加支持对象与json的转换 2.2添加命名空间 xmlns:mvc="http://www.springframework....
阅读全文
posted @
2016-01-12 22:09
Simle
阅读(239)
推荐(0) 编辑
[三]SpringMvc学习-封装、乱码问题、重定向、转发
摘要:1.对象属性自动封装 前台input 用对象的属性名,后台自动会封装为对象,类似struts2.解决post乱码问题 在web.xml中配置过滤器 characterEncodingFilter org.springframework.web.filter.CharacterEncoding...
阅读全文
posted @
2016-01-12 21:46
Simle
阅读(435)
推荐(0) 编辑
[二]SpringMvc实践-注解
摘要:1.@RequestMapping("/list")映射访问路径2.@RequestParam(value="id",required=false)请求参数,false为非必须3.org.springframework.web.servlet.ModelAndView;返回模型和视图
阅读全文
posted @
2015-12-30 22:41
Simle
阅读(151)
推荐(0) 编辑
[一]初识SpringMVC
摘要:是什么? web开发框架为什么用? 功能强大怎么做? 1.导入jar包 2.配置web.xml SpringMvc01 index.html index.htm index.jsp default.html default.htm defau...
阅读全文
posted @
2015-12-30 21:47
Simle
阅读(185)
推荐(0) 编辑