Announcement Announcement Module
Collapse
No announcement yet.
Generating code in controllers Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Generating code in controllers

    Hello,

    I want to modify CRUD methods in my controller. How can I generate code in controllers?

  • #2
    Roo will only ever generate code in the AspectJ ITDs. You can easily move the generated code from an ITD to the .java file, though:

    - Just cut and copy the code from the .aj to the .java.

    - Or, more preferably, use the Eclipse AJDT "Refactoring > Push In Refactor" feature for the class you want to move the members from the .aj to .java. This will take care of ensuring any translation steps are properly and automatically completed.

    You can also write a handle method in the .java controller as you would any other Spring controller. You don't need to firstly create a scaffolded controller. The "controller class" command is possibly useful if you'd prefer to write a controller from scratch (as opposed to use a scaffolded version).

    Comment

    Working...
    X