inheritance « MVC Controller « Spring Q&A

1. Spring: controller inheritance using @Controller annotation

I'd like to be able to create a base controller in my Spring app that, among other things, determines if a user is a registered user or not. This base ...

2. Questions about how inheritance affects Spring Controller classes when using a base controller class

If I use a base controller class in Spring MVC, do controllers defined as subclasses get separate instances of any private static objects defined in the base controller? For example: BaseController:

public class BaseController


3. In Spring 3, is it possible to use inheritance with annotated controllers?

In particular, is this possible? My base controller:

public class BaseController {

    public User getUser(@PathVariable String id) {


4. Spring MVC controller inheritance and routing

In my Spring MVC webapp I have a generic RESTful controller for CRUD operations. And each concrete controller had to decalare only a @RequestMapping, for example /foo. Generic controller handled all ...

5. @Controller with inherited class instance in a handler method

Hi I have example @Controller class, which simply has one method Code: @Controller class MyController { private Map> inputRegistry; public void handleInput(AbstractInput input){ //need instance of an inherited ...