如:
@GetMapping
@PostMapping
@DeleteMapping
。。。。。。等等
可以使用正则表达式来指定参数的格式
比如,以下是使用正则表达式来指定id是数字类型
@GetMapping("get/{id:\\d+}/result")
public void get(@PathVariable Long id) {
log.error("id={}", id);
}
如:
@GetMapping
@PostMapping
@DeleteMapping
。。。。。。等等
可以使用正则表达式来指定参数的格式
比如,以下是使用正则表达式来指定id是数字类型
@GetMapping("get/{id:\\d+}/result")
public void get(@PathVariable Long id) {
log.error("id={}", id);
}