I want to disable Roo scaffolding

时间秒杀一切 提交于 2019-12-10 13:02:22

问题


Because I have manually tuned my entities and controllers and view, I would like roo to change none of them. Nevertheless I would like roo to keep on scaffolding all new entities. How could I do that


回答1:


You can modify the @RooWebScaffold annotation in your entity by adding update=false attribute for it.

@RooWebScaffold(path = "<yourpath>", formBackingObject = <YourClass>.class, update=false)

This tells Roo not to scaffold and update views for the generated entity.

Cheers!!!




回答2:


Remove @RooEntity annotation from your entities and you should be good.

Hope that helps.




回答3:


.aj are automanaged you must put your code in .java and if you need change any method defined in .aj you must copy it in the .java an change it there. STS and roo will delete it automatically from the .aj.

For the second question, yes you can do it. Roo only manage the file views created by him, but only change all tags that have the "z" parameter autogenerated by him. So if you change manually an autogenerated view and you want thar roo does not change it you must put in z parameter an undefined z value, for example (z=-1 or z="user_managed") and roo will not change those tags.

source: http://forum.springsource.org/archive/index.php/t-126182.html



来源:https://stackoverflow.com/questions/6229229/i-want-to-disable-roo-scaffolding

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!