Let's say that we have ProductController.
It's reasonable to annotate it with class-level @RequestMapping("/product") in order to group all methods under same mapping.
But what if some endpoints need to have "/admin" prefix?
Right now this is not possible.
Putting @RequestMapping("/product") or @RequestMapping("/admin/product") on every method in this controller is tedious and having separate ProductController and ProductAdminController is not best solution either.
It would be great if SpringWeb could introduce @Prefix("/admin") annotation, that would prefix class-level @RequestMapping
It would be even nicer when it was possible to support combining class-level @RequestMappings by inheritance.
When @RequestMapping is used on the method level, what would useSuperclassMapping mean? Such a method already inherits a class-level @RequestMapping, so it can't inherit from a base class method it overrides as one might assume. I'm afraid introducing a new annotation into the mix isn't simplifying things either.
It's a little hard to give more specific advice without knowing what these endpoints do (i.e. product vs admin product) do and how they relate to each other.