since I need to serve two APIs which controllers are very similar in most of all cases and therefore I'd like to work with abstract controllers and sub controllers in order to achieve routes like:
/sym/products
/frontend/products
Where the "sym" or "frontend" part should be generated by abstract superclasses (controllers) like
@RestController
@CrossOrigin
@RequestMapping("sym")
public abstract class SymphonyBaseController {}
and
@RestController
@CrossOrigin
@RequestMapping("frontend")
public abstract class FrontendBaseController {}
so I could do:
@RestController
@CrossOrigin
@RequestMapping("products")
public class ProductController extends SymphonyBaseController {}
Btw: are these annotations (@RestController and @CrossOrigin) in the subclasses necessary anyway when annotated in super class already?)
My problem: The routes are not being registered. I only get a single route: /products
How to fix this?
I'd really appreciate your help! Thanks in advance,
Tim