Rename ResourceProperties.Chain.html5AppCache
Rename the `html5AppCache` property from `ResourceProperties.Chain` to `html-application-cache`. Fixes gh-3354
This commit is contained in:
@@ -77,9 +77,9 @@ public class ResourceProperties {
|
||||
private boolean cache = true;
|
||||
|
||||
/**
|
||||
* Enable HTML5 app cache manifest rewriting.
|
||||
* Enable HTML5 application cache manifest rewriting.
|
||||
*/
|
||||
private boolean html5AppCache = false;
|
||||
private boolean htmlApplicationCache = false;
|
||||
|
||||
private final Strategy strategy = new Strategy();
|
||||
|
||||
@@ -103,12 +103,12 @@ public class ResourceProperties {
|
||||
return this.strategy;
|
||||
}
|
||||
|
||||
public boolean isHtml5AppCache() {
|
||||
return this.html5AppCache;
|
||||
public boolean isHtmlApplicationCache() {
|
||||
return this.htmlApplicationCache;
|
||||
}
|
||||
|
||||
public void setHtml5AppCache(boolean html5AppCache) {
|
||||
this.html5AppCache = html5AppCache;
|
||||
public void setHtmlApplicationCache(boolean htmlApplicationCache) {
|
||||
this.htmlApplicationCache = htmlApplicationCache;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ public class WebMvcAutoConfiguration {
|
||||
if (strategy.getFixed().isEnabled() || strategy.getContent().isEnabled()) {
|
||||
chain.addResolver(getVersionResourceResolver(strategy));
|
||||
}
|
||||
if (properties.isHtml5AppCache()) {
|
||||
if (properties.isHtmlApplicationCache()) {
|
||||
chain.addTransformer(new AppCacheManifestTransformer());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ public class WebMvcAutoConfigurationTests {
|
||||
"spring.resources.chain.strategy.fixed.enabled:true",
|
||||
"spring.resources.chain.strategy.fixed.version:test",
|
||||
"spring.resources.chain.strategy.fixed.paths:/**/*.js",
|
||||
"spring.resources.chain.html5AppCache:true");
|
||||
"spring.resources.chain.html-application-cache:true");
|
||||
assertThat(getResourceResolvers("/webjars/**").size(), equalTo(2));
|
||||
assertThat(getResourceTransformers("/webjars/**").size(), equalTo(2));
|
||||
assertThat(getResourceResolvers("/**").size(), equalTo(2));
|
||||
|
||||
@@ -132,7 +132,7 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.resources.add-mappings=true # if default mappings should be added
|
||||
spring.resources.chain.enabled=false # enable the Spring Resource Handling chain (enabled automatically if at least a strategy is enabled)
|
||||
spring.resources.chain.cache=false # enable in-memory caching of resource resolution
|
||||
spring.resources.chain.html5AppCache=false # enable HTML5 appcache manifest rewriting
|
||||
spring.resources.chain.html-application-cache=false # enable HTML5 appcache manifest rewriting
|
||||
spring.resources.chain.strategy.content.enabled=false # enable a content version strategy
|
||||
spring.resources.chain.strategy.content.paths= # comma-separated list of regular expression patterns to apply the version strategy to
|
||||
spring.resources.chain.strategy.fixed.enabled=false # enable a fixed version strategy
|
||||
|
||||
Reference in New Issue
Block a user