Auto-configure @EnableConfigurationProperties

Add an auto-configuration that avoid a Spring Boot user to add
`@EnableConfigurationProperties` to its configuration to benefit from
that feature.

As our own auto-configurations are tested independently, such annotation
is still present to avoid a useless reference to this new
auto-configuration.

Closes gh-2457
This commit is contained in:
Stephane Nicoll
2015-08-04 13:59:57 +02:00
parent 0e8812f0e9
commit bfe930a873
6 changed files with 144 additions and 5 deletions

View File

@@ -20,14 +20,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
import org.springframework.validation.Validator;
@SpringBootApplication
@EnableConfigurationProperties
public class SamplePropertyValidationApplication {
@Bean