Browse Source

Merge branch '3.5.x'

Closes gh-46586
pull/46627/head
Stéphane Nicoll 6 months ago
parent
commit
a7e0689a50
  1. 11
      module/spring-boot-test-autoconfigure/build.gradle
  2. 9
      module/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/SpringBootMockMvcBuilderCustomizer.java
  3. 18
      module/spring-boot-test-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

11
module/spring-boot-test-autoconfigure/build.gradle

@ -16,6 +16,7 @@ @@ -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 { @@ -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"
}

9
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 @@ -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;
/**

18
module/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json → module/spring-boot-test-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

@ -6,24 +6,6 @@ @@ -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",
Loading…
Cancel
Save