Page 1 of 1

Map multiple requests to existing controller

Posted: Mon Jun 08, 2015 6:53 am
by rudy
Hi,

I have extended ProductImpl and added a few properties as per the regular steps.
My new class is TestImpl.

I can create/update this entity easily.
Now, i wanted this as a separate section inside "Catalog"

I followed the regular steps, and my new class is appearing and functioning fine [with URL /test]
Now, instead of creating a new controller altogether, i want to RE-USE the existing AdminProductController with [/test] URL.

Can anybody guide me?

Regards,
Rudy

Re: Map multiple requests to existing controller

Posted: Wed Jun 17, 2015 2:06 pm
by phillipuniverse
I am not sure if this will work but try subclassing the AdminProductController and adding your own @RequestMapping like this:

Code: Select all

@RequestMapping("/test")
public class TestAdminController extends AdminProductController {

    // intentionally empty

}