Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to see a map of all @RequestMapping URLs in Intellij IDEA?

Is there a way to see all @RequestMapping annotations as map of all requests/URLs, ideally with quick links to whichever Controller/method handles the URL?

In Spring 2 (before annotations) XML config (SimpleUrlHandlerMapping) could be used as such reference, now with annotated controllers is there any other way besides searching the codebase?

like image 382
Aramir Avatar asked Jun 24 '14 00:06

Aramir


2 Answers

yes we can do the same as we can see that in STS spring explore , coming to intellij Go to Project Structure >> Modules >> select your project and add Spring to your project .

This will give you a spring tab at the bottom to see all the controllers.

like image 157
BSrinivas Avatar answered Nov 15 '22 13:11

BSrinivas


2021 update: you can download a popular plugin in Intelij called Request mapper.

Currently it supports both Spring and JAX-RS path mappings.

request mapper plugin

like image 40
Panagiotis Bougioukos Avatar answered Nov 15 '22 13:11

Panagiotis Bougioukos