mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix test-specific configuration metadata
Most of the config keys defined by the `spring-boot-test-autoconfigure` module can't be overridden because they are mapped with `@PropertyMapping` on an annotation. It is confusing that such keys are exposed in content assistance as using them will have no effect. This commit removes the annotation processor from the build so that the `@ConfigurationProperties` beans aren't processed anymore. Instead, manual metadata is written for the two only keys that are effectively used in regular configuration. As a result, the `additional-spring-configuration-metadata` file has been renamed to `spring-configuration-metadata` since nothing is processing it anymore. Closes gh-7887
This commit is contained in:
parent
973a18db2a
commit
7a75fb0f38
@ -1195,5 +1195,6 @@ content into your application; rather pick only the properties that you need.
|
||||
# ----------------------------------------
|
||||
|
||||
spring.test.database.replace=any # Type of existing DataSource to replace.
|
||||
spring.test.mockmvc.print=default # MVC Print option.
|
||||
|
||||
----
|
||||
|
@ -121,12 +121,6 @@
|
||||
<artifactId>spring-security-test</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- Annotation processing -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -5,6 +5,12 @@
|
||||
"type": "org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase$Replace",
|
||||
"description": "Type of existing DataSource to replace.",
|
||||
"defaultValue": "any"
|
||||
},
|
||||
{
|
||||
"name": "spring.test.mockmvc.print",
|
||||
"type": "org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrint",
|
||||
"description": "MVC Print option.",
|
||||
"defaultValue": "default"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user