替换过期的key

This commit is contained in:
Looly
2022-08-30 11:26:23 +08:00
parent c538014042
commit 7ddcc117fd
2 changed files with 6 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ import org.apache.velocity.app.Velocity;
/**
* Velocity模板引擎<br>
* 见http://velocity.apache.org/
* 见:<a href="http://velocity.apache.org/">http://velocity.apache.org/</a>
*
* @author looly
*/
@@ -132,13 +132,13 @@ public class VelocityEngine implements TemplateEngine {
}
break;
case WEB_ROOT:
ve.setProperty(Velocity.RESOURCE_LOADER, "webapp");
ve.setProperty(Velocity.RESOURCE_LOADERS, "webapp");
ve.setProperty("webapp.resource.loader.class", "org.apache.velocity.tools.view.servlet.WebappLoader");
ve.setProperty("webapp.resource.loader.path", StrUtil.nullToDefault(config.getPath(), StrUtil.SLASH));
break;
case STRING:
ve.setProperty(Velocity.RESOURCE_LOADER, "str");
ve.setProperty("str.resource.loader.class", SimpleStringResourceLoader.class.getName());
ve.setProperty(Velocity.RESOURCE_LOADERS, "str");
ve.setProperty("resource.loader.str.class", SimpleStringResourceLoader.class.getName());
break;
default:
break;