mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Disable resource chain cache when DevTools is enabled
If the resource chain is used, such as by using the `"spring.resources.chain.strategy.content.enabled"` property, resource chain caching can prevent the developer from seeing changes made to resources, so that caching should be disabled when DevTools is enabled. This commit sets the `"spring.resources.chain.cache"` property to `true` when devtools is enabled.
This commit is contained in:
parent
6bcdc431b2
commit
fc535fe27c
@ -54,6 +54,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.resources.chain.cache", "false");
|
||||
properties.put("spring.template.provider.cache", "false");
|
||||
properties.put("spring.mvc.log-resolved-exception", "true");
|
||||
PROPERTIES = Collections.unmodifiableMap(properties);
|
||||
|
Loading…
Reference in New Issue
Block a user