81,122
社区成员




@Override
protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
String contextPath = PropertyUtil.getPropertyByKey("sitemesh.contentPath");
String decoratorPath = PropertyUtil.getPropertyByKey("sitemesh.decoratorPath");
builder.addDecoratorPath(contextPath, decoratorPath);
// builder.addDecoratorPath("/sitemesh/*", "/sitemesh/index");
builder.addExcludedPath("/admin/*");
builder.addExcludedPath("/sitemesh/index");
}
#sitemesh
sitemesh.contentPath = "/sitemesh/*"
sitemesh.decoratorPath = "/sitemesh/index"
sitemesh.excludedPaths ="/js/*,/css/*,/admin/*,/sitemesh/index"
public static String getPropertyByKey(String key) {
String value = "";
Locale locale = Locale.getDefault();
try {
ResourceBundle localResource = ResourceBundle.getBundle("constant",locale);
value = localResource.getString(key);
} catch (MissingResourceException mre) {
value = "";
mre.printStackTrace();
// LoggerUtil.logger.error("=====配置文件constant.properties文件没找着",mre);
}
return value;
}