Add @RequestMapping to the class and access the address, which is the class and the method dishes can access the method. For example, the address in the picture above is /hello/say
@RequestMapping(value = "/hello",method = RequestMethod.GET) and @GetMapping(value = "/hello") are equivalent
This way, you can get the value of the url parameter, the result is as follows
Summarize
The above is the use of controllers and the acquisition of url parameters in spring boot introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!