Commit 37b4ebb7 authored by Phillip Webb's avatar Phillip Webb

Merge pull request #1652 from Stummi/velo-preferfsa-property

* velo-preferfsa-property:
  Add VelocityProperties.preferFilesystemAccess
parents 62eb01f0 5d32ec74
......@@ -81,6 +81,7 @@ public class VelocityAutoConfiguration {
protected void applyProperties(VelocityEngineFactory factory) {
factory.setResourceLoaderPath(this.properties.getResourceLoaderPath());
factory.setPreferFileSystemAccess(this.properties.isPreferFileSystemAccess());
Properties velocityProperties = new Properties();
velocityProperties.putAll(this.properties.getProperties());
factory.setVelocityProperties(velocityProperties);
......
......@@ -48,6 +48,8 @@ public class VelocityProperties extends AbstractTemplateViewResolverProperties {
private String toolboxConfigLocation;
private boolean preferFileSystemAccess = true;
public VelocityProperties() {
super(DEFAULT_PREFIX, DEFAULT_SUFFIX);
}
......@@ -92,6 +94,14 @@ public class VelocityProperties extends AbstractTemplateViewResolverProperties {
this.toolboxConfigLocation = toolboxConfigLocation;
}
public boolean isPreferFileSystemAccess() {
return this.preferFileSystemAccess;
}
public void setPreferFileSystemAccess(boolean preferFileSystemAccess) {
this.preferFileSystemAccess = preferFileSystemAccess;
}
@Override
public void applyToViewResolver(Object viewResolver) {
super.applyToViewResolver(viewResolver);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment