使用 SpringSource 工具套件进行 ROO 注释

发布于 2024-10-24 04:30:39 字数 132 浏览 7 评论 0原文

如何在 STS 项目中使用/启用 ROO 注释(我相信它正在使用 AspectJ?)?

例如,我想使用: @RooJavaBean 用于自动生成 getter/setter 方法。

(Maven也被“安装”在项目中)

How can I use/enable ROO annotations (I beleive it's using AspectJ?) inside a STS project?

For example, I want to use :
@RooJavaBean for generating the getter/setter methods automagically.

(Maven is also "installed" in the project)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

哭泣的笑容 2024-10-31 04:30:39

您需要创建一个 Roo 项目,系统会自动为您处理这些注释。您可以通过 New Roo 项目向导来执行此操作:

File -> New... -> Spring Roo Project

You need to create a Roo project and these annotations are handled for you automatically. You can do this through the New Roo project wizard:

File -> New... -> Spring Roo Project
记忆里有你的影子 2024-10-31 04:30:39

为此,您必须使用 ROO shell,然后按照提示进行操作。

例如,要创建带有 ROO 注释的 java bean:

roo> entity --class ~.User --testAutomatically
roo> field string --fieldName name --notNull

You have to use the ROO shell for this and just follow the hints.

For example, to create a java bean with ROO annotations:

roo> entity --class ~.User --testAutomatically
roo> field string --fieldName name --notNull
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文