springboot07-springmvc常用注解
1、@RestController

2、@RequestMapping

此方法就相当于

3、若某些情况只要求用get---@GetMapping

【注意:这个注解就相当于@GetMapping(value= "queryStudentById2"), 只能接收get请求】 注解@GetMapping通常在查询数据的时候使用
4、@PostMapping

【注意:该注解通常在新增数据的时候使用】
5、@DeleteMapping

【该注解通常在删除数据的时候使用】
6、@PutMapping

【该注解通常在更新数据的时候使用】

浙公网安备 33010602011771号