Allow template lookup caching to be disabled

Extract TemplateAvailabilityProvider caching logic to a new
TemplateAvailabilityProviders class and provide property support to
disable it. Also update DevToolsPropertyDefaultsPostProcessor to
automatically set the property.

Fixes gh-5989
This commit is contained in:
Phillip Webb
2016-05-20 13:54:54 +02:00
parent 14c7a1284e
commit ccdcad757a
6 changed files with 436 additions and 44 deletions

View File

@@ -51,6 +51,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro
properties.put("server.session.persistent", "true");
properties.put("spring.h2.console.enabled", "true");
properties.put("spring.resources.cache-period", "0");
properties.put("spring.template.provider.cache", "false");
PROPERTIES = Collections.unmodifiableMap(properties);
}