【发布时间】:2014-11-06 06:31:20
【问题描述】:
当我访问 localhost:8080 时,我想得到没有修饰的 index.html。 当我访问 localhost:8080/admin 时,我希望所有页面都被装饰。
我的配置是
<?xml version="1.0" encoding="UTF-8"?>
<sitemesh>
<!-- <mapping path="/" exclude="true"/> not work -->
<mapping path="/index.html" exclude="true"/>
<mapping path="/assets/*" exclude="true"/>
<mapping path="/admin*" decorator="/WEB-INF/decorators/decorator.html"/>
</sitemesh>
除非我访问 localhost:8080:index.html
,否则 index.html 不会被修饰【问题讨论】:
-
您是否尝试了“排除”而不是“排除”?不知何故,我认为这似乎是网络上其他示例中的正确属性名称。
标签: spring-mvc sitemesh