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:
Stephane Nicoll 2017-01-06 10:12:57 +01:00
parent 973a18db2a
commit 7a75fb0f38
3 changed files with 7 additions and 6 deletions

View File

@ -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.
----

View File

@ -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>

View File

@ -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"
}
]
}