Spring Boot-3 (@PathVariable和@RequestParam)

First on the map

1, to achieve

 

@GetMapping parameters can be verified annotations in parentheses, and may be regular, as shown in FIG.

In @PathVariable with handler receives parameters and parameter verification url @RequestParam

@PathVariable validation parameters: api / {} parameter / parameters {}

@RequestParam validation parameters: api key1 = value1 & key2 = value2?

 

2, verification

 

Guess you like

Origin www.cnblogs.com/manru75/p/11256958.html