[英]ROO Annotations with SpringSource Tool Suite
How can I use/enable ROO annotations (I beleive it's using AspectJ?) inside a STS project? 如何在STS项目中使用/启用ROO注释(我相信它使用AspectJ?)?
For example, I want to use : @RooJavaBean for generating the getter/setter methods automagically. 例如,我想使用:@RooJavaBean自动生成getter / setter方法。
(Maven is also "installed" in the project) (Maven也在项目中“安装”)
You need to create a Roo project and these annotations are handled for you automatically. 您需要创建一个Roo项目,并自动为您处理这些注释。 You can do this through the New Roo project wizard: 您可以通过New Roo项目向导执行此操作:
File -> New... -> Spring Roo Project
You have to use the ROO shell for this and just follow the hints. 你必须使用ROO shell,然后按照提示操作。
For example, to create a java bean with ROO annotations: 例如,要使用ROO注释创建java bean:
roo> entity --class ~.User --testAutomatically
roo> field string --fieldName name --notNull
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.