第三种利用spring mvc3的注解@ResponseBody 例如: @ResponseBody @RequestMapping("/list") public List<String> list(ModelMap modelMap) { String hql = "select c from Clothing c "; Page<Clothing> page = new Page<Clothing>(); page.setP…
Pay attention: When using these annotations, the object itself has to be created by Spring context. If the object is instantiated in code, then this object is out-of-scope of Spring! Spring不但支持自己定义的@Autowired注解,还支持几个由JSR-250规范定义的注解,它们分别是@Resource.@Po…