Using the Spring Roo shell, earlier I created three entities and performed the controller all function. However, I then implemented the string converters into the java controllers and deleted them out of the aspectj controllers, because Roo's aspect j files appended unnecessary information to each reference field.
You shouldn't need to "delete them out of the aspectj", if you copy the converter into the java file and remove the ControllerName and save the file, the next time you run roo or if roo is running, it will remove the converter from the aspectj file for you. One thing I have noticed if I have a typo or something, roo let's me know by not removing it from the aspectj.
Example:
ProjectController_Roo_Controller.aj contains this:
Code:
Converter<Project,String> ProjectController.getProjectConverter()
return new Converter<Project, String>() {
public String convert(Project project) {
return new StringBuilder().append(project.getName().toString();
}
};
}
Copied to ResourceController.java:
Code:
Converter<Project,String> getProjectConverter()
return new Converter<Project, String>() {
public String convert(Project project) {
return new StringBuilder().append(project.getName().toString();
}
};
}
Save ProjectController.java. If roo is running, the you should get Managed Project_Controller_Roo_Controller.aj
When you open up Project_Controll_Roo_Controller.aj the getProjectConverter has been removed, since you declared it in the java file.
One thing I have noticed if you forget to change ProjectController.getProjectConverter to getProjectConverter then roo doesn't manage anything, and continues to use the original getProjectConverter defined the int .aj
Another thing I have noticed is that if you have something in the code (usually typos) that roo doesn't understand but is interested in, it causes the Manage/Undo. Once you fix the typo, roo fixes everything and the Undo's go away.
In some cases, just trying to compile the code, will let you know where the typo is.
Just started using Roo, so if this information isn't totally correct I apologize, just wanted to share my experience.