It gets more interesting.
I have the web scaffolding generated by roo. In one controller, I pushed in exactly one method
Code:
@RooWebScaffold(path = "thermalspaces", formBackingObject = ThermalSpace.class)
@RequestMapping("/thermalspaces")
@Controller
public class ThermalSpaceController {
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
public String show(@PathVariable("id") Long id, Model uiModel) {
uiModel.addAttribute("thermalspace", ThermalSpace.findThermalSpace(id));
uiModel.addAttribute("itemId", id);
return "thermalspaces/show";
}
}
Note that the method in question is unchanged from the version generated by roo in the _Roo_Controller.aj aspect.
I was getting the following warnings (or, at least, I took them to be warnings) when the roo shell initialized
Code:
Undo manage SRC_MAIN_WEBAPP/WEB-INF/i18n/application.properties
Method 'show' already defined in target type 'com.company.web.ThermalSpaceController' (ITD target 'com.company.web.ThermalSpaceController_Roo_Controller')
I assumed that was just the roo shell telling me that it had found my version of the method so it was not generating the same thing in the aspect - and, indeed, the method was not generated. However, it was apparently preventing the shell from doing any further work when scanning the filesystem for changes. As soon as I commented out the controller method in the java file and re-launched the roo shell, the shell detected all of my changes and proceeded to re-generate everything as I had been expecting it to do.
So my question is - if I need to modify a web scaffold controller method so that I can add something else to the model, how can I do so without breaking my entire roo project?