Search code examples
springspring-rooscaffolding

SpringRoo @RooWebScaffold, generate source code


I am partly following quickstart tutorial at http://projects.spring.io/spring-roo/#quick-start.

I created an entity class and generated MVC using web mvc all --package ~.web command.

Question I have is that my controller class has scaffolding done using @RooWebScaffold, how do I generate the code for it? Is there a command synonymous to Grails generate all. In grails this command would actually generate actions called update, edit, delete, insert etc with full code which can be edited.

Thanks


Solution

  • Spring Roo generates code in aspects. These aspects are then integrated into the application code using the ajc compiler.

    That is why you do not see any code in the controller. In order to see the code in the controller you need to use the Push-In refactoring that is provided by both Eclipse and IntelliJ IDEs.

    Keep in my that if you push-in the aspects into the application code, you will no longer be able to add new code to that controller with Roo.