Spring MVC 3.0 和 Apache Tiles 2
我目前正在一个基于 Spring MVC 3 的项目中,前几天发现了 Apache Tiles 2,
我认为 Tiles 2 是一个很棒的框架,我可以在我的项目中充分利用它,但在我承诺之前,我鉴于 Tiles 与 Struts 的固有关系,我想知道它是否与 Spring MVC 3 集成良好。 Spring 似乎也有一些框架的问题,所以我想小心总比后悔好。
那么,您对 Spring、Spring MVC 3 和 Tiles 2 的使用体验如何?
谢谢!
I'm currently in a Spring MVC 3 based project, and found out about Apache Tiles 2 the other day,
I think Tiles 2 is a heck of framework that I could make good use in my project, but before I commit to it, I would like to know if it integrates well with Spring MVC 3, given that Tiles' inherent relationship with Struts. Spring also seems to have issues with some frameworks, so better careful than sorry I guess.
So, how's your experience with Spring, Spring MVC 3 and Tiles 2 together?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Spring MVC 和 Tiles 完美结合。 Spring MVC 将tile 定义视为视图,并且两者顺利集成。从 Spring 开始参考。有相当多的示例可以指导您。
Spring MVC and Tiles go great together. Spring MVC treats tiles definitions as views, and the two integrates smoothly. Start with the Spring Reference. There are quite a few examples out there to guide you.
他们融合得非常好。您可以从这个示例开始,非常简单。
您只需要配置您的 web-app-config.xml (Spring 配置)、您的 tiles-defs.xml (Tiles 配置),然后您就可以开始实现您的 < strong>JSP(使用tiles标签)。
如果您使用 Maven,则只需将这些依赖项添加到 Tiles2 的 Spring 项目中:
They integrate really well together. You can start with this example, really straightforward.
You just need to configure your web-app-config.xml (Spring config), your tiles-defs.xml (Tiles config) and then you can start implementing your JSPs (using tiles tag).
If you're using Maven, you just need to add those dependencies to your Spring project for Tiles2:
除了 sebarmeli 之外,我还想提一下,tiles 还需要 slf4j 日志框架:
并且您可能还想使用 jstl:
In Addition to sebarmeli I would like to mention, that tiles also needs the slf4j logging framework:
And you probably want to use jstl as well: