如何在 Spring MVC 3.0 中创建可重用组件
好吧,我真的不知道从哪里开始。我一直在尝试在 Spring MVC 中开发可重用的类似组件的页面。我最终使用了瓷砖。我的想法来自《Spring in action》一书中关于编写 ComponentControllerSupport 类的内容。但问题是从tile2和spring 3.0开始的。 tile1 的所有旧功能均已弃用,tile2 已更改很多(例如“page”属性更改为“template”,“controllerClass”更改为“preparer”等)。如果有人知道如何编写“准备者”类或其他方法来处理此类可重用组件,请帮助我。
Ok I really don't know where to start. I have been trying to develop reusable component-like pages in Spring MVC. I ended up using tiles. I had the idea from "Spring in action" book on writing ComponentControllerSupport class. But the problem starts with tile2 and spring 3.0. All old features of tile1 is deprecated and tile2 has changed a lot(like "page" attribute changed into "template" and "controllerClass" changed into "preparer" etc). If anybody knows how to write that "preparer" class or other ways to approach such reusable components please help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你知道春罗吗?它使用最佳实践生成应用程序的框架,这应该是进一步开发的良好起点。请参阅http://www.springsource.org/roo/why
Do you know Spring Roo ? It generates a skeleton of application using best practices that should be good starting point for further development. See http://www.springsource.org/roo/why