Disable file system preference for Freemarker templates
Previously to this commit, a project that has several classpath locations matching the template path may lead to some of those locations to be ignored if one of them is a directory. This can easily happen if you run your tests in your IDE. This commit changes the default of "preferFileSystemAccess" to false so that the complete classpath is always considered. Closes gh-23051
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,10 +49,12 @@ public class FreeMarkerProperties extends AbstractTemplateViewResolverProperties
|
||||
private String[] templateLoaderPath = new String[] { DEFAULT_TEMPLATE_LOADER_PATH };
|
||||
|
||||
/**
|
||||
* Whether to prefer file system access for template loading. File system access
|
||||
* enables hot detection of template changes.
|
||||
* Whether to prefer file system access for template loading to enables hot detection
|
||||
* of template changes. When a template path is detected as a directory, templates are
|
||||
* loaded from the directory only and other matching classpath locations will not be
|
||||
* considered.
|
||||
*/
|
||||
private boolean preferFileSystemAccess = true;
|
||||
private boolean preferFileSystemAccess;
|
||||
|
||||
public FreeMarkerProperties() {
|
||||
super(DEFAULT_PREFIX, DEFAULT_SUFFIX);
|
||||
|
||||
Reference in New Issue
Block a user