Spring Roo 1.2:仅使用 Spring Roo 创建控制器,没有 jspx 文件
我正在尝试创建一个位于 roo generated gae 项目上的 RAD jquery 移动应用程序生成器。我编写了生成器代码,用于查找所有 jpa 实体,然后利用使用 roo 创建的 REST/JSON 服务在找到的实体上创建完整的 jquery 移动应用程序。类似于 roo web mvc
对 dojo Web 应用程序所做的事情。我正在尝试找到一种方法来仅创建 REST/JSON 控制器,而不是所有视图内容(jspx/tagx/tiles/等),因为它们不部署到 gae。有谁知道这是否可以在不直接编辑 roo 插件的情况下实现?
project --topLevelPackage com.testpackage --java 6 --projectName testproject
persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE
entity jpa --class ~.domain.Company --testAutomatically
field string --fieldName name --sizeMax 50
service --interface ~.service.CompanyService
json add --class ~.domain.Company
controller all --package ~.controller.CompanyController <---- creates the controller and all the unwanted web stuff
任何想法将不胜感激...
I am trying to create a RAD jquery mobile application generator that sits on a roo generate gae project. I've written the generator code that finds all jpa entities and then creates a full jquery mobile application over the found entities utilizing REST/JSON services created with roo. Similar to what roo web mvc
does with the dojo web app. I'm trying to find a way to only create the REST/JSON controller and not all the view stuff (jspx/tagx/tiles/etc) as they do not deploy to gae. Does anyone know if this is possible without editing the roo plugin directly?
project --topLevelPackage com.testpackage --java 6 --projectName testproject
persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE
entity jpa --class ~.domain.Company --testAutomatically
field string --fieldName name --sizeMax 50
service --interface ~.service.CompanyService
json add --class ~.domain.Company
controller all --package ~.controller.CompanyController <---- creates the controller and all the unwanted web stuff
Any thought would be greatly appreciated...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我很高兴地报告,Spring Roo 1.2.5 可以实现这一点。
使用
mvn jetty:run
启动 Jetty 服务器。现在,您可以发布歌曲:
或获取所有歌曲的列表:
curl http://localhost:8080/jukebox/songs
或者通过 id 获取歌曲:
curl http://本地主机:8080/点唱机/歌曲/1
I'm happy to report that this is possible with Spring Roo 1.2.5.
Spin up a Jetty server with
mvn jetty:run
.Now, you can POST a song:
Or GET a list of all songs:
curl http://localhost:8080/jukebox/songs
Or GET a song by id:
curl http://localhost:8080/jukebox/songs/1
我最终分叉了 roo web 插件源代码。进行了修改,因此 jspx 文件没有被复制。
I ended up forking the roo web addon source code. Made the modification so the jspx files were not copied over.