/**
*Controller层
*/
@RequestMapping("/downUserInfo")
publicvoiddownUserInfo(HttpServletRequestrequest,
HttpServletResponseresponse){
try{
djsService.downUserInfo(request,response);
}catch(Exceptione){
e.printStackTrace();
}
}
/**
*servic..
分类:
数据库 时间:
2015-10-19 17:34:09
阅读次数:
265
/** * 导出excel表格 */ @RequestMapping(value = "/doExportData", method = {RequestMethod.POST, RequestMethod.GET}) public void doExportUs...
分类:
编程语言 时间:
2015-10-15 09:52:21
阅读次数:
191
在SpringMVC后台控制层获取参数的方式主要有两种,一种是request.getParameter("name"),另外一种是用注解@RequestParam直接获取。这里主要讲这个注解 一、基本使用,获取提交的参数后端代码:Java代码 @RequestMapping("testRe...
分类:
编程语言 时间:
2015-10-14 17:32:11
阅读次数:
157
最直接的Ajax处理 只要在Controller的方法里面,直接使用response输出你要返回的的Ajax数据,然后return null就可以了,示例如下:Controller示例1 @RequestMapping(value = "/hello")2 public ModelAndView h...
分类:
编程语言 时间:
2015-10-14 15:54:41
阅读次数:
273
(转自:http://blog.csdn.net/walkerjong/article/details/7994326)引言:前段时间项目中用到了RESTful模式来开发程序,但是当用POST、PUT模式提交数据时,发现服务器端接受不到提交的数据(服务器端参数绑定没有加任何注解),查看了提交方式为a...
分类:
移动开发 时间:
2015-10-13 10:34:35
阅读次数:
256
(转自:http://blog.csdn.net/walkerjong/article/details/7946109#)引言:接上一篇文章,对@RequestMapping进行地址映射讲解之后,该篇主要讲解request 数据到handler method 参数数据的绑定所用到的注解和什么情形下使...
分类:
编程语言 时间:
2015-10-13 10:34:28
阅读次数:
241
先看效果:sql(使用MyBatis): java code: /********************************** 供管分时统计******************************/ @RequestMapping("/skipPrmti...
分类:
其他好文 时间:
2015-10-12 19:10:42
阅读次数:
193
经常需要在spring的controller之间跳转request,自然想到servlet的forward和redirect方法,还好,spring也提供了类似方法。@RequestMapping(value="/main",method={RequestMethod.GET,RequestMeth...
分类:
编程语言 时间:
2015-10-12 12:24:29
阅读次数:
202
引言:前段时间项目中用到了REST风格来开发程序,但是当用POST、PUT模式提交数据时,发现服务器端接受不到提交的数据(服务器端参数绑定没有加任何注解),查看了提交方式为application/json, 而且服务器端通过request.getReader() 打出的数据里确实存在浏览器提交的数据...
分类:
移动开发 时间:
2015-10-12 00:35:16
阅读次数:
225
value的uri值为以下三类:A) 可以指定为普通的具体值;B) 可以指定为含有某变量的一类值(URI Template Patterns with Path Variables);@RequestMapping(value="/owners/{ownerId}", method=RequestM...
分类:
编程语言 时间:
2015-10-10 17:20:27
阅读次数:
348