笔记本(Spring boot)

@ResponseBody  +  @Controller  =@RestController  控制器

@Service  服务层

@TableName("sys_log")  @TableId("id")  @TableField("name")  实体类

@RequestMapping  +  RequestMethod.POST  =@GetMapping/@PostMapping("/{..}")

@Autowired

@RequestParam(name="",value="",required=true(默认),defaultValue="")

  接收地址栏参数,后跟String  int  array  map  list  object,接收form表单,文件上传

  map:  /test?a=b&c=d:  参数中包含Map时不要再写其他参数,否则map都会包含进去

@RequestBody

  接收消息体参数,后跟Object  map,接收json,xml、、、

猜你喜欢

转载自www.cnblogs.com/1506wch/p/10035779.html
今日推荐