From 268b7911dd1725fa71911ad32b5daf29d486b395 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 29 Jun 2015 17:14:44 -0700 Subject: [PATCH] Rename ResourceProperties.Chain.html5AppCache Rename the `html5AppCache` property from `ResourceProperties.Chain` to `html-application-cache`. Fixes gh-3354 --- .../boot/autoconfigure/web/ResourceProperties.java | 12 ++++++------ .../autoconfigure/web/WebMvcAutoConfiguration.java | 2 +- .../web/WebMvcAutoConfigurationTests.java | 2 +- .../asciidoc/appendix-application-properties.adoc | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java index ab79cd1518..3c67da9f50 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java @@ -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; } } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java index 33a425059a..8cbae048ec 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java @@ -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()); } } diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java index 20728edb22..d178194521 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java @@ -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)); diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index cf780de4d4..73a8c6cfac 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -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