@Controller
public class TestCon
{
@ResponseBody
@RequestMapping("/test")
public Object test(@RequestBody
final TBean tBean)
{
System.out.println(tBean);
final List
DEBUG DefaultAnnotationHandlerMapping - Mapping [/test.do] to HandlerExecutionChain with handler [test.controllers.TestCon@c81672] and 1 interceptor DEBUG AnnotationMethodHandlerExceptionResolver - Resolving exception from handler [test.controllers.TestCon@c81672]: org.springframework.web.HttpMediaTypeNotSupportedException: Cannot extract parameter (TBean tBean): no Content-Type found DEBUG ResponseStatusExceptionResolver - Resolving exception from handler [test.controllers.TestCon@c81672]: org.springframework.web.HttpMediaTypeNotSupportedException: Cannot extract parameter (TBean tBean): no Content-Type found DEBUG DefaultHandlerExceptionResolver - Resolving exception from handler [test.controllers.TestCon@c81672]: org.springframework.web.HttpMediaTypeNotSupportedException: Cannot extract parameter (TBean tBean): no Content-Type found DEBUG DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcher': assuming HandlerAdapter completed request handling
DEBUG DefaultAnnotationHandlerMapping - Mapping [/test.do] to HandlerExecutionChain with handler [test.controllers.TestCon@c81672] and 1 interceptor DEBUG AnnotationMethodHandlerExceptionResolver - Resolving exception from handler [test.controllers.TestCon@c81672]: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/pan' not supported DEBUG ResponseStatusExceptionResolver - Resolving exception from handler [test.controllers.TestCon@c81672]: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/pan' not supported DEBUG DefaultHandlerExceptionResolver - Resolving exception from handler [test.controllers.TestCon@c81672]: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/pan' not supported DEBUG DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcher': assuming HandlerAdapter completed request handling
Spring MVC3 本身也提供直接把JSON对象映射到JavaBean的功能,例如MappingJackson2HttpMessageConverter和MappingJackson2JsonView。 在这里我们希望通过fastjson来实现序列化和反序列化。所以我们要自定义一个HandlerMethodArgumentResolver用来指定HttpServletRequest的Body映射到一个JavaBean。并且返回的JavaBean通过fastjson序列化。
利用javascript读取表单数据,可以利用以下三种方法获取:
1、通过表单ID属性:var a = document.getElementByIdx_x_x("id");
2、通过表单名称属性:var b = document.getElementsByName("name");
3、直接通过表单名字获取:var c = form.content.
什么是Spring Data Mongo
Spring Data MongoDB项目对访问MongoDB的Java客户端API进行了封装,这种封装类似于Spring封装Hibernate和JDBC而提供的HibernateTemplate和JDBCTemplate,主要能力包括
1. 封装客户端跟MongoDB的链接管理
2. 文档-对象映射,通过注解:@Document(collectio
The insertion algorithm for 2-3 trees just described is not difficult to understand; now, we will see that it is also not difficult to implement. We will consider a simple representation known