Moonstar
Moonstar

Reputation: 247

Grails REST API with two controllers

I have a problem and couldn't find any concrete tutorials about defining a domain class (e.g. Person) as uri resource but using the dependent controller (e.g. PersonController) for rendering pages and a restful controller using this domain class just for API Requests.

Can anybody give me an advice?

Thanks in advance.

Upvotes: 1

Views: 67

Answers (1)

Moonstar
Moonstar

Reputation: 247

I found the solution. You just have to define a restful controller and remove the resource uris in the domain class.

Upvotes: 1

Related Questions