Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring MVC @Controller method signatures

Is there an easy way to view all the possible method signature when I create a controller by annotating a class with @Controller?

I can't find a spring documentation that lists all of that. From their guide, it seems to be really flexible where I don't know what I can be returning or what I could use in the method parameters.

like image 513
Glide Avatar asked Dec 07 '22 11:12

Glide


1 Answers

You should check the Spring MVC reference documentation again. In the "Defining @RequestMapping handler methods" chapter, everything is listed and explained :

  • all the possible parameters
  • all the possible return types
  • all the possible method/parameter annotations, each one having its sub-chapter : @RequestParam, @RequestBody, @ResponseBody, @ModelAttribute, etc.
like image 119
Jerome Dalbert Avatar answered Dec 20 '22 16:12

Jerome Dalbert