无需完整的脚手架即可生成 RESTful 控制器
我想要 Roo 生成的 JSON 控制器的东西。我不需要完整的 HTML 脚手架。
据我所知,我只能将前者生成为后者的一个方面。是否可以单独生成它们?我有一整套我自己编写的视图控制器。我可以在控制器上添加注释,让 Roo 为我提供 REST 功能吗?
I want the Roo-generated JSON controller stuff. I don't want the full HTML scaffolding stuff.
As far as I can see, I can only generate the former as an aspect on the latter. Is it possible to generate them separately? I have a whole set of view controllers I'm writing of my own. Is there an annotation I can put on my controller to have Roo give me REST functions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想通了。
注释
@RooWebScaffold
就是答案。我找不到 roo 命令来安装这些命令,但将该注释放在我的类上会使其生成 REST 接口的 Web 脚手架。编辑:实际上这完全不能回答我的问题。它确实生成 REST 访问代码,但它也生成所有 Web 脚手架内容。我已在 JIRA 上提交了此功能的票证。
I figured it out.
The annotation
@RooWebScaffold
is the answer. I can't find a roo command to install those, but putting that annotation on my classes makes it generate the web scaffolding for the REST interface.EDIT: Actually that completely doesn't answer my question. It DOES generate the REST access code, but it ALSO generates all the web scaffolding stuff. I've submitted a ticket on the JIRA for this feature.