I'm working on a Spring MVC project using Annotated Controller.
One thing that I'm interested in is about the order which @RequestMapping
instruction to be processed.
For example, I want all /green/basic/welcome
to be mapped to GreenController.welcome()
but green/{treeId}/{treeName}
to be mapped to GreenController.viewTree(treeId, treeName)
.
I guess I need to specify two @RequestMapping
with @RequestMapping
of /green/basic/welcome
to be processed first, so that it won't be interpreter as a call to GreenControllerviewTree("basic", "welcome")
.
Can you guys guide me on that?