I want to create 2 controllers with the same name and in different packages, one for UI the other is REST.
Is this possible in grails 2.1.3? if yes, how?
ps: I tried and it didn't work, grails mix both controllers
I want to create 2 controllers with the same name and in different packages, one for UI the other is REST.
Is this possible in grails 2.1.3? if yes, how?
ps: I tried and it didn't work, grails mix both controllers
Copyright © 2021 Jogjafile Inc.
Defining and mapping controllers to URLs is done by convention. So if you have the same name
XController
in different packages, that would lead to the same mapping - and how would you decide which controller/action to call if both just have the same?Rename one of your controller so it makes sense for the developer (e.G.
UiXController
) and then optionally do an url mapping if the URLs are important for some reason.