无需完整的脚手架即可生成 RESTful 控制器

发布于 2024-12-15 08:12:44 字数 140 浏览 4 评论 0原文

我想要 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 技术交流群。

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

发布评论

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

评论(1

凉宸 2024-12-22 08:12:44

我想通了。

注释 @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.

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