Spring Roo is a smart tool, it's architecture supports code customization that can be retained.
Let's say you create a web controller using Spring Roo. The code generated by Spring Roo is split into two parts:
1. AspectJ ITD files (these are similar to
Java source files but have a slight different syntax). The code in AspectJ ITDs is managed by Spring Roo. So, you must not modify methods, constructors and attributes defined in this file. This file has .aj extension.
2. Java source file. Roo will never overwrite any modifications that you make in methods, constructors and attributes of your Java source file.
Let's say you want to customize a method definied in AspectJ ITD file. You can use Push-in refactoring to move the method definition from AspectJ ITD file to the corresponding Java source file. Now, you can modify the method in the Java source file. This will ensure that your modifications are retained.
regards
ashish