Skip to content

Commit 8b98db4

Browse files
committed
1 parent de208cd commit 8b98db4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public static class Cache {
283283
* Cache control HTTP headers, only allows valid directive combinations. Overrides
284284
* the 'spring.resources.cache.period' property.
285285
*/
286-
private final CacheControl cacheControl = new CacheControl();
286+
private final Cachecontrol cachecontrol = new Cachecontrol();
287287

288288
public Duration getPeriod() {
289289
return this.period;
@@ -293,14 +293,14 @@ public void setPeriod(Duration period) {
293293
this.period = period;
294294
}
295295

296-
public CacheControl getCacheControl() {
297-
return this.cacheControl;
296+
public Cachecontrol getCachecontrol() {
297+
return this.cachecontrol;
298298
}
299299

300300
/**
301301
* Cache Control HTTP header configuration.
302302
*/
303-
public static class CacheControl {
303+
public static class Cachecontrol {
304304

305305
/**
306306
* Maximum time the response should be cached, in seconds if no duration

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
307307
return;
308308
}
309309
Duration cachePeriod = this.resourceProperties.getCache().getPeriod();
310-
CacheControl cacheControl = this.resourceProperties.getCache().getCacheControl()
310+
CacheControl cacheControl = this.resourceProperties.getCache().getCachecontrol()
311311
.toHttpCacheControl();
312312
if (!registry.hasMappingForPattern("/webjars/**")) {
313313
customizeResourceHandlerRegistration(

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ public void customStaticLocationsAreNormalizedToEndWithTrailingSlash() {
7373

7474
@Test
7575
public void emptyCacheControl() {
76-
org.springframework.http.CacheControl cacheControl = this.properties.getCache().getCacheControl()
76+
org.springframework.http.CacheControl cacheControl = this.properties.getCache().getCachecontrol()
7777
.toHttpCacheControl();
7878
assertThat(cacheControl.getHeaderValue()).isNull();
7979
}
8080

8181
@Test
8282
public void cacheControlAllPropertiesSet() {
83-
Cache.CacheControl properties = this.properties.getCache().getCacheControl();
83+
Cache.Cachecontrol properties = this.properties.getCache().getCachecontrol();
8484
properties.setMaxAge(Duration.ofSeconds(4));
8585
properties.setCachePrivate(true);
8686
properties.setCachePublic(true);
@@ -98,7 +98,7 @@ public void cacheControlAllPropertiesSet() {
9898

9999
@Test
100100
public void invalidCacheControlCombination() {
101-
Cache.CacheControl properties = this.properties.getCache().getCacheControl();
101+
Cache.Cachecontrol properties = this.properties.getCache().getCachecontrol();
102102
properties.setMaxAge(Duration.ofSeconds(4));
103103
properties.setNoStore(true);
104104
org.springframework.http.CacheControl cacheControl = properties.toHttpCacheControl();

0 commit comments

Comments
 (0)