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

* velo-preferfsa-property:
  Add VelocityProperties.preferFilesystemAccess
pull/1671/head
Phillip Webb 10 years ago
commit 37b4ebb76c

@ -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);

Loading…
Cancel
Save