Spring MVC中支持的参数类型和返回值类型1.Spring MVC支持的参数类型支持原始的Servlet和HttpServletSession对象@PathVariable注解修饰的参数,用于获取url模板变量目的其实是返回没有进行变量修饰的参数,例如要拿到地址栏中最后的1:http://localhost:8080/rc/demo2/1具体代码 @RequestMapping("/demo2/{a}") public String m2(@PathVariable(
Spring MVC中支持的参数类型和返回值类型1.Spring MVC支持的参数类型支持原始的Servlet和HttpServletSession对象@PathVariable注解修饰的参数,用于获取url模板变量目的其实是返回没有进行变量修饰的参数,例如要拿到地址栏中最后的1:http://localhost:8080/rc/demo2/1具体代码 @RequestMapping("/demo2/{a}") public String m2(@PathVariable(