Search code examples
jsonspring-mvcspring-roo

Generating RESTful controllers without full scaffolding


I want the Roo-generated JSON controller stuff. I don't want the full HTML scaffolding stuff.

As far as I can see, I can only generate the former as an aspect on the latter. Is it possible to generate them separately? I have a whole set of view controllers I'm writing of my own. Is there an annotation I can put on my controller to have Roo give me REST functions?


Solution

  • I figured it out.

    The annotation @RooWebScaffold is the answer. I can't find a roo command to install those, but putting that annotation on my classes makes it generate the web scaffolding for the REST interface.

    EDIT: Actually that completely doesn't answer my question. It DOES generate the REST access code, but it ALSO generates all the web scaffolding stuff. I've submitted a ticket on the JIRA for this feature.