diff --git a/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebPropertiesResourcesTests.java b/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebPropertiesResourcesTests.java index b453b5fd464..13a54d5bdad 100644 --- a/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebPropertiesResourcesTests.java +++ b/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebPropertiesResourcesTests.java @@ -77,12 +77,20 @@ class WebPropertiesResourcesTests { assertThat(cacheControl).isNull(); } + @Test + void cacheControlPublic() { + Cache.Cachecontrol properties = this.properties.getCache().getCachecontrol(); + properties.setCachePublic(true); + CacheControl cacheControl = properties.toHttpCacheControl(); + assertThat(cacheControl).isNotNull(); + assertThat(cacheControl.getHeaderValue()).isEqualTo("public"); + } + @Test void cacheControlAllPropertiesSet() { Cache.Cachecontrol properties = this.properties.getCache().getCachecontrol(); properties.setMaxAge(Duration.ofSeconds(4)); properties.setCachePrivate(true); - properties.setCachePublic(true); properties.setMustRevalidate(true); properties.setNoTransform(true); properties.setProxyRevalidate(true); @@ -92,7 +100,7 @@ class WebPropertiesResourcesTests { CacheControl cacheControl = properties.toHttpCacheControl(); assertThat(cacheControl).isNotNull(); assertThat(cacheControl.getHeaderValue()) - .isEqualTo("max-age=4, must-revalidate, no-transform, public, private, proxy-revalidate," + .isEqualTo("max-age=4, must-revalidate, no-transform, private, proxy-revalidate," + " s-maxage=5, stale-if-error=6, stale-while-revalidate=7"); } diff --git a/gradle.properties b/gradle.properties index 0fa984e9e9a..fceef17fcf8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,7 +22,7 @@ nativeBuildToolsVersion=1.1.12 nullabilityPluginVersion=0.0.15 snakeYamlVersion=2.7 springGrpcVersion=1.1.1 -springFrameworkVersion=7.1.0-M1 +springFrameworkVersion=7.1.0-SNAPSHOT springFramework60xVersion=6.0.23 tomcatVersion=11.0.25 protobufGradlePluginVersion=0.9.6 diff --git a/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/reactive/GraphQlWebFluxAutoConfigurationTests.java b/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/reactive/GraphQlWebFluxAutoConfigurationTests.java index 535fc239fa0..d63dc88bab7 100644 --- a/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/reactive/GraphQlWebFluxAutoConfigurationTests.java +++ b/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/reactive/GraphQlWebFluxAutoConfigurationTests.java @@ -134,9 +134,9 @@ class GraphQlWebFluxAutoConfigurationTests { .expectBody(String.class) .returnResult(); assertThat(result.getResponseBody()).contains("event:next", - "data:{\"data\":{\"booksOnSale\":{\"id\":\"book-1\",\"name\":\"GraphQL for beginners\",\"pageCount\":100,\"author\":\"John GraphQL\"}}}", + "data: {\"data\":{\"booksOnSale\":{\"id\":\"book-1\",\"name\":\"GraphQL for beginners\",\"pageCount\":100,\"author\":\"John GraphQL\"}}}", "event:next", - "data:{\"data\":{\"booksOnSale\":{\"id\":\"book-2\",\"name\":\"Harry Potter and the Philosopher's Stone\",\"pageCount\":223,\"author\":\"Joanne Rowling\"}}}", + "data: {\"data\":{\"booksOnSale\":{\"id\":\"book-2\",\"name\":\"Harry Potter and the Philosopher's Stone\",\"pageCount\":223,\"author\":\"Joanne Rowling\"}}}", "event:complete"); }); } diff --git a/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/servlet/GraphQlWebMvcAutoConfigurationTests.java b/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/servlet/GraphQlWebMvcAutoConfigurationTests.java index 37e32547b12..ed5f7207512 100644 --- a/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/servlet/GraphQlWebMvcAutoConfigurationTests.java +++ b/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/servlet/GraphQlWebMvcAutoConfigurationTests.java @@ -148,9 +148,9 @@ class GraphQlWebMvcAutoConfigurationTests { assertThat(result).hasStatusOk().hasContentTypeCompatibleWith(MediaType.TEXT_EVENT_STREAM); assertThat(result).bodyText() .containsSubsequence("event:next", - "data:{\"data\":{\"booksOnSale\":{\"id\":\"book-1\",\"name\":\"GraphQL for beginners\",\"pageCount\":100,\"author\":\"John GraphQL\"}}}", + "data: {\"data\":{\"booksOnSale\":{\"id\":\"book-1\",\"name\":\"GraphQL for beginners\",\"pageCount\":100,\"author\":\"John GraphQL\"}}}", "event:next", - "data:{\"data\":{\"booksOnSale\":{\"id\":\"book-2\",\"name\":\"Harry Potter and the Philosopher's Stone\",\"pageCount\":223,\"author\":\"Joanne Rowling\"}}}"); + "data: {\"data\":{\"booksOnSale\":{\"id\":\"book-2\",\"name\":\"Harry Potter and the Philosopher's Stone\",\"pageCount\":223,\"author\":\"Joanne Rowling\"}}}"); }); }); } diff --git a/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnection.java b/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnection.java index b413df5fdac..b43893f85d1 100644 --- a/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnection.java +++ b/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnection.java @@ -100,6 +100,7 @@ public enum EmbeddedDatabaseConnection { * Returns the {@link EmbeddedDatabaseType} for the connection. * @return the database type */ + @SuppressWarnings("removal") public @Nullable EmbeddedDatabaseType getType() { // See https://github.com/spring-projects/spring-boot/issues/32865 return switch (this) { diff --git a/module/spring-boot-jdbc/src/test/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnectionTests.java b/module/spring-boot-jdbc/src/test/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnectionTests.java index 2d51114a425..ed404b5ea53 100644 --- a/module/spring-boot-jdbc/src/test/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnectionTests.java +++ b/module/spring-boot-jdbc/src/test/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnectionTests.java @@ -111,6 +111,8 @@ class EmbeddedDatabaseConnectionTests { } @Test + @Deprecated(since = "4.2.0", forRemoval = true) + @SuppressWarnings("removal") void isEmbeddedWithDerbyDataSource() { testEmbeddedDatabase(new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).build()); }