Sunday, January 30, 2011

STS - @RequestMappings View

Sometimes I wonder if I really know the tools lurking beneath the surface of my Eclipse IDE ;) - today I've discovered @RequestMappings View - part of SpringSource Tool Suite (STS). I know, you probably use it for centuries already ;) - but for me it was really nice surprise :) - The rest of this post is for all the developers having feeling that there should be something like that, but still looking for it ;)

Let's start from the beginning, and open this View:

At the bottom of the Eclipse window you should see something like this:

Let's populate it with some data now ;) - this is the hardest part, because your project should have a Spring Project Nature, my own didn't have it, therefore I had to correct its configuration - adding missing Nature first:

and defining which files contain Spring Beans:

Finally we can find the file defining our application's request handlers, and populate the View with defined mappings:

Which will look somehow like this now:

When you click twice on any of the lines in this view you'll be transfered to the appropriate handler method, like in this example:

I'm still learning this View, and hope that next STS versions (I'm using 2.5.2 currently) will bring more functionality in it.

No comments:

Post a Comment