摘要:前端代码: Controller代码: 如果后台使用Controller这样接收参数,那么必须传递进来参数如下格式: [{"name":"1","address":"a1"},{"name":"2","address":"b1"},{"name":"3","address":"c1"},{"name
阅读全文
随笔分类 - springmvc
摘要:(一)输出json数据 springmvc中使用jackson-mapper-asl即可进行json输出,在配置上有几点: 1.使用mvc:annotation-driven 2.在依赖管理中添加jackson-mapper-asl 3.使用注解@ResponseBody mvc:annotatio
阅读全文
摘要:1、 spring mvc中的@PathVariable是用来获得请求url中的动态参数的 @RequestMapping(value="/user/{userId}/roles/{roleId}",method = RequestMethod.GET) public String getLogin
阅读全文