Enable configuration properties scanning in smoke tests that need it

Closes gh-18674
pull/18870/head
Andy Wilkinson 5 years ago
parent ea5fa2ccac
commit 8c0773361a

@ -18,8 +18,10 @@ package smoketest.actuator.noweb;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
@SpringBootApplication @SpringBootApplication
@ConfigurationPropertiesScan
public class SampleActuatorNoWebApplication { public class SampleActuatorNoWebApplication {
public static void main(String[] args) { public static void main(String[] args) {

@ -20,9 +20,11 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator; import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@SpringBootApplication @SpringBootApplication
@ConfigurationPropertiesScan
public class SampleActuatorApplication { public class SampleActuatorApplication {
public static void main(String[] args) { public static void main(String[] args) {

@ -19,10 +19,12 @@ package smoketest.propertyvalidation;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.validation.Validator; import org.springframework.validation.Validator;
@SpringBootApplication @SpringBootApplication
@ConfigurationPropertiesScan
public class SamplePropertyValidationApplication implements CommandLineRunner { public class SamplePropertyValidationApplication implements CommandLineRunner {
private final SampleProperties properties; private final SampleProperties properties;

@ -18,6 +18,7 @@ package smoketest.test;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
/** /**
* Sample application to demonstrate testing. * Sample application to demonstrate testing.
@ -25,6 +26,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* @author Phillip Webb * @author Phillip Webb
*/ */
@SpringBootApplication @SpringBootApplication
@ConfigurationPropertiesScan
public class SampleTestApplication { public class SampleTestApplication {
// NOTE: this application will intentionally not start without MySQL, the test will // NOTE: this application will intentionally not start without MySQL, the test will

Loading…
Cancel
Save