Request annotations in Spring MVC

Such as:
@GetMapping
@PostMapping
@DeleteMapping
. . . . . . Etc.
You can use regular expressions to specify the format of the parameters

For example, the following is the use of regular expressions to specify that id is a number type

@GetMapping("get/{id:\\d+}/result")
public void get(@PathVariable Long id) {
    
    
	log.error("id={}", id);
}

Guess you like

Origin blog.csdn.net/weixin_43871678/article/details/112184073