Modifying show method of generated roo controler
I am learning Roo and 开发者_JAVA百科have a database with a student object that has associated score objects. I would like to display the score objects when the show method is executed on the student controler. The StudentController.java file contains no code, am I correct in assuming I need to modify the associated .aj file? If so how do I tell Roo to not overwrite any changes I make?
You should put your code to the StudentController.java. The .aj files are managed by Roo, .java files are left up to you and will not be overwritten by Roo.
You can push-in the existing code in the .aj files into your .java files, then you can modify it there. In eclipse, your can use the aspectj refactoring menu.
精彩评论