spring
jasin4j
这个作者很懒,什么都没留下…
展开
-
【spring mvc】@RequestParam、@RequestBody和@ModelAttribute和@PathVariable的区别
一、@RequestParamGET和POST请求传的参数会自动转换赋值到@RequestParam 所注解的变量上1. @RequestParam(org.springframework.web.bind.annotation.RequestParam)用于将指定的请求参数赋值给方法中的形参。(1) get/post请求:url请求:http://localhost:8080/...原创 2019-04-04 15:14:35 · 624 阅读 · 0 评论 -
【spring mvc】Controller内注入的Service为null
将方法误写为 私有的 private类型。导致service注入失败。 /** * 管理列表页面 */ @RequiresPermissions("core:checkItem:list") @RequestMapping(value = {"list", ""}) private String list(CheckItem checkItem,HttpServletRequ...转载 2019-03-27 09:57:47 · 1207 阅读 · 0 评论