Skip to content

Commit fc535fe

Browse files
candrewsbclozel
authored andcommitted
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.
1 parent 6bcdc43 commit fc535fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro
5454
properties.put("server.session.persistent", "true");
5555
properties.put("spring.h2.console.enabled", "true");
5656
properties.put("spring.resources.cache-period", "0");
57+
properties.put("spring.resources.chain.cache", "false");
5758
properties.put("spring.template.provider.cache", "false");
5859
properties.put("spring.mvc.log-resolved-exception", "true");
5960
PROPERTIES = Collections.unmodifiableMap(properties);

0 commit comments

Comments
 (0)