上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页
  2012年3月26日
摘要: Behind the scenes, a HttpMessageConverter underpins reading therequest body and generating the responseMultiple converters may be registered for different content typesFor @RequestBody, the first converter that can read the POSTed "Content-Type" into the desired method parameter type is us 阅读全文
posted @ 2012-03-26 23:10 leaving 阅读(2902) 评论(0) 推荐(1)
摘要: 1.Return a POJO annotated with @ResponseBody:POJO marshaled as the body of the response @RequestMapping(value="/response/annotation", method=RequestMethod.GET) public @ResponseBody String responseBody() { return "The String ResponseBody"; } @RequestMapping(value="/response/c 阅读全文
posted @ 2012-03-26 22:53 leaving 阅读(259) 评论(0) 推荐(0)
摘要: 1.HttpServletRequest (or its more portable WebRequest wrapper)、Principal、Locale@RequestMapping(value="/data/standard/request", method=RequestMethod.GET)public @ResponseBody String standardRequestArgs(HttpServletRequest request, Principal user, Locale locale) { StringBuilder buffer = new St 阅读全文
posted @ 2012-03-26 22:43 leaving 阅读(532) 评论(0) 推荐(0)
摘要: 1. a query parameter value@RequestParam("name")2.a group of query parameter values//A custom JavaBean with a getName()/setName() pair for each parameter@RequestMapping(value="group")public @ResponseBody String withParamGroup(JavaBean bean) { return "Obtained parameter group 阅读全文
posted @ 2012-03-26 22:37 leaving 阅读(648) 评论(0) 推荐(0)
摘要: 1. by path@RequestMapping("path")2. by http method@RequestMapping("path", method=RequestMethod.GET)3. by presence of query parameter@RequestMapping("path", method=RequestMethod.GET, params="foo")Negation also supported: params={ "foo", "!bar&quo 阅读全文
posted @ 2012-03-26 22:28 leaving 阅读(475) 评论(0) 推荐(0)
摘要: 1. DispatcherServlet render Views Alternative to having a HttpMessageConverter write the response body Designed for generating text/* content from a template @RequestMapping(value="html", method=RequestMethod.GET) public String prepare(Model model) { model.addAttribute("foo", &qu 阅读全文
posted @ 2012-03-26 01:14 leaving 阅读(359) 评论(0) 推荐(0)
摘要: <%@ page isELIgnored="false" %> 阅读全文
posted @ 2012-03-26 01:05 leaving 阅读(240) 评论(0) 推荐(0)
  2012年3月25日
摘要: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${java-version}</source> <target>${java-version}</target> </configuration></plugin><plugin> <gr 阅读全文
posted @ 2012-03-25 22:57 leaving 阅读(1132) 评论(0) 推荐(0)
摘要: 在server.xml中加入以下配置:<Context docBase="d:\dev\src\main\webapp" path="/mywebapp" reloadable="true"/> 阅读全文
posted @ 2012-03-25 22:22 leaving 阅读(219) 评论(0) 推荐(0)
  2012年3月11日
摘要: #include<stdio.h>#include"cv.h"#include"highgui.h"int main(int argc,char** argv){ IplImage *img; IplImage *tpl; IplImage *res; CvPoint minloc, maxloc; double minval, maxval; /* check for arguments */ if(argc <3){ fprintf(stderr,"Usage: template_match <reference&g 阅读全文
posted @ 2012-03-11 22:17 leaving 阅读(654) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页