diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java index f762a69ff4..38fdfc5526 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java @@ -283,7 +283,7 @@ public class ResourceProperties { * Cache control HTTP headers, only allows valid directive combinations. Overrides * the 'spring.resources.cache.period' property. */ - private final CacheControl cacheControl = new CacheControl(); + private final Cachecontrol cachecontrol = new Cachecontrol(); public Duration getPeriod() { return this.period; @@ -293,14 +293,14 @@ public class ResourceProperties { this.period = period; } - public CacheControl getCacheControl() { - return this.cacheControl; + public Cachecontrol getCachecontrol() { + return this.cachecontrol; } /** * Cache Control HTTP header configuration. */ - public static class CacheControl { + public static class Cachecontrol { /** * Maximum time the response should be cached, in seconds if no duration diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java index 0dc0564fc2..580446c7c8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java @@ -307,7 +307,7 @@ public class WebMvcAutoConfiguration { return; } Duration cachePeriod = this.resourceProperties.getCache().getPeriod(); - CacheControl cacheControl = this.resourceProperties.getCache().getCacheControl() + CacheControl cacheControl = this.resourceProperties.getCache().getCachecontrol() .toHttpCacheControl(); if (!registry.hasMappingForPattern("/webjars/**")) { customizeResourceHandlerRegistration( diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java index b1dba5de76..57beddccdc 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java @@ -73,14 +73,14 @@ public class ResourcePropertiesTests { @Test public void emptyCacheControl() { - org.springframework.http.CacheControl cacheControl = this.properties.getCache().getCacheControl() + org.springframework.http.CacheControl cacheControl = this.properties.getCache().getCachecontrol() .toHttpCacheControl(); assertThat(cacheControl.getHeaderValue()).isNull(); } @Test public void cacheControlAllPropertiesSet() { - Cache.CacheControl properties = this.properties.getCache().getCacheControl(); + Cache.Cachecontrol properties = this.properties.getCache().getCachecontrol(); properties.setMaxAge(Duration.ofSeconds(4)); properties.setCachePrivate(true); properties.setCachePublic(true); @@ -98,7 +98,7 @@ public class ResourcePropertiesTests { @Test public void invalidCacheControlCombination() { - Cache.CacheControl properties = this.properties.getCache().getCacheControl(); + Cache.Cachecontrol properties = this.properties.getCache().getCachecontrol(); properties.setMaxAge(Duration.ofSeconds(4)); properties.setNoStore(true); org.springframework.http.CacheControl cacheControl = properties.toHttpCacheControl();