diff --git a/module/spring-boot-test-autoconfigure/build.gradle b/module/spring-boot-test-autoconfigure/build.gradle index 9686c765932..1bd38bc21f7 100644 --- a/module/spring-boot-test-autoconfigure/build.gradle +++ b/module/spring-boot-test-autoconfigure/build.gradle @@ -16,6 +16,7 @@ plugins { id "java-library" + id "org.springframework.boot.configuration-properties" id "org.springframework.boot.deployed" id "org.springframework.boot.docker-test" id "org.springframework.boot.optional-dependencies" @@ -184,16 +185,6 @@ dependencies { testRuntimeOnly("org.flywaydb:flyway-database-hsqldb") } -configurations { - configurationPropertiesMetadata -} - -artifacts { - configurationPropertiesMetadata new File(sourceSets.main.output.resourcesDir, "META-INF/spring-configuration-metadata.json"), { artifact -> - artifact.builtBy sourceSets.main.processResourcesTaskName - } -} - test { include "**/*Tests.class" } diff --git a/module/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/SpringBootMockMvcBuilderCustomizer.java b/module/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/SpringBootMockMvcBuilderCustomizer.java index edfe86c89e6..a0c62279081 100644 --- a/module/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/SpringBootMockMvcBuilderCustomizer.java +++ b/module/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/SpringBootMockMvcBuilderCustomizer.java @@ -59,10 +59,19 @@ public class SpringBootMockMvcBuilderCustomizer implements MockMvcBuilderCustomi private final WebApplicationContext context; + /** + * Whether to add servlet filters. + */ private boolean addFilters = true; + /** + * MVC Print option. + */ private MockMvcPrint print = MockMvcPrint.DEFAULT; + /** + * Whether to only print failed exchanges. + */ private boolean printOnlyOnFailure = true; /** diff --git a/module/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json b/module/spring-boot-test-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json similarity index 56% rename from module/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json rename to module/spring-boot-test-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 9c46345ca72..3e102c043ef 100644 --- a/module/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json +++ b/module/spring-boot-test-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -6,24 +6,6 @@ "description": "Type of existing DataSource to replace.", "defaultValue": "any" }, - { - "name": "spring.test.mockmvc.add-filters", - "type": "java.lang.Boolean", - "description": "Whether to add servlet filters.", - "defaultValue": true - }, - { - "name": "spring.test.mockmvc.print", - "type": "org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrint", - "description": "MVC Print option.", - "defaultValue": "default" - }, - { - "name": "spring.test.mockmvc.print-only-on-failure", - "type": "java.lang.Boolean", - "description": "Whether to only print failed exchanges.", - "defaultValue": true - }, { "name": "spring.test.observability.auto-configure", "type": "java.lang.Boolean",