重复使用 Sitemesh 布局
我有一些网络应用程序,我想为其重用相同的布局。我希望我可以通过依赖项消耗来引导布局,最简单的方法是:
<sitemesh>
<property name="decorators-file" value="classpath:path/to/decorators.xml"/>
<excludes file="${decorators-file}"/>
但这会引发异常。
我想另一种选择是使用一些构建技巧将资源复制到 WEB-INF 文件夹,但这似乎是一种黑客行为。
我更喜欢某种 Spring 解决方案(我正在使用 SpringMVC)。我希望 Spring 有某种命名空间配置,这样我就可以本质上嵌入 sitemesh.xml 和/或decorators.xml。
有谁知道如何实现这一目标?瓷砖有这样的东西吗?
I have a few webapps that I want to reuse an identical layout for. I was hoping I could bootstrap the layout via dependency consumption with the simplest method being:
<sitemesh>
<property name="decorators-file" value="classpath:path/to/decorators.xml"/>
<excludes file="${decorators-file}"/>
But that throws an exception.
I guess another option is to have some build trickery to copy the resources to the WEB-INF folder, but that seems like a hack.
I'd prefer some sort of Spring solution (I'm using SpringMVC). I wish Spring had some sort of namespace config so that I could essentially embed the sitemesh.xml and/or decorators.xml.
Does anyone know a way to accomplish this? Does Tiles have something like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论