无法继续使用 Spring Roo:高级 MVC 问题
我计划开始一个新项目,并决定采用一项我没有经验的新技术来让我的生活更轻松:Spring!
特别是Spring Roo,这就是我的问题。
Spring Roo 做了很多自动魔法的东西,我真的不知道如何继续。由于这有可能变成咆哮,所以让我更具体一些,然后提出我的问题:
Spring 非常适合设置我的类并使用 Hibernate 等来持久化它们。我遇到的主要问题是尝试搭建我的项目。
我正在开发一个项目,该项目管理一些具有多对多和多对一关系的“集”引用。这立即会给脚手架应用带来问题。
尝试通过“gwt setup”添加 Google Web Toolkit 会立即终止应用程序。尝试加载 Tomcat 服务器变得不可能,并且无法撤消该过程(据我所知)。现在怎么办?据我所知,我必须从原始命令重新启动我的项目并重新应用我的更改。
话虽如此,在我看来,最好的过程是使用 ROO 生成我的项目工件,然后创建我自己的视图/控制器设置。即使在这里我也遇到了问题,因为图块配置似乎对其工作原理非常模糊。我很难弄清楚如何采用自定义 JSP 来处理一些复杂的多对一关系(启用 AJAX)并将其添加到我的 Web 前端。
有这方面的指南吗?
仅供参考:在现有的 Roo 生成的 MVC 中,我尝试
- 复制 JSP
- 创建一个包装不同实体类型的表单支持对象
- 修改文件夹中的views.xml 文件以识别页面
其中之一是完成的,但我不确定如何实现继续。如何访问我的 JSP?手动输入在views.xml 中定义的URL 不起作用。
我是否应该考虑完全放弃 Roo 并从头开始一个 Spring 项目?
I was scheduled to begin work on a new project and decided to make my life easier by adopting a new technology that I had no experience with: Spring!
Specifically Spring Roo, and therein lies my problem.
Spring Roo does so much auto-magical stuff that I really do not know how to proceed. As this runs the risk of turning into a rant, let me be more specific and then follow it up with my question:
Spring works great for setting up my classes and persisting them with Hibernate and all that. The main problem I am having is in trying to scaffold my project.
I am working on a project that manages a few "set" references with many-to-many and many-to-one relationships. This immediately will have problem with the scaffolding application.
Trying to add Google Web Toolkit via 'gwt setup' kills the application immediately. Trying to load in Tomcat server becomes impossible and there is no way to undo the process (as far as I know). Now what? I have to restart my project from the original commands and reapply my changes as far as I can tell.
With this being said it seems to me that the best process is to use ROO to generate my project artifacts and then create my own View/Controller setup. Even here I am having problems though, because the tiles configuration seems so obscured from how it works. I am having a hard time figuring out how to take a custom JSP that can process some of these complex many-to-one relationships (AJAX enabled) and add it to my web front.
Are there any guides for this?
FYI: in the existing Roo Generated MVC I tried
- Copying over my JSP
- Creating a Form Backing Objects that wraps the different entity types
- Modifying the views.xml file in the folder to recognize the page
One this was accomplished, though, I have been unsure how to proceed. How do I access my JSP? Manually typing the URL as it is defined in views.xml does not work.
Should I think about abandoning Roo altogether and starting a Spring project from scratch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
学习 Spring Roo 的方式
使用Spring Roo搭建
Bet way to learn Spring Roo
Using Spring Roo for scaffolding
mvn eclipse:clean eclipse:eclipse
and re-import project if necessarily.