Skip to content

Commit 8c07733

Browse files
committed
Enable configuration properties scanning in smoke tests that need it
Closes gh-18674
1 parent ea5fa2c commit 8c07733

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-noweb/src/main/java/smoketest/actuator/noweb/SampleActuatorNoWebApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818

1919
import org.springframework.boot.SpringApplication;
2020
import org.springframework.boot.autoconfigure.SpringBootApplication;
21+
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
2122

2223
@SpringBootApplication
24+
@ConfigurationPropertiesScan
2325
public class SampleActuatorNoWebApplication {
2426

2527
public static void main(String[] args) {

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/src/main/java/smoketest/actuator/SampleActuatorApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
import org.springframework.boot.actuate.health.Health;
2121
import org.springframework.boot.actuate.health.HealthIndicator;
2222
import org.springframework.boot.autoconfigure.SpringBootApplication;
23+
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
2324
import org.springframework.context.annotation.Bean;
2425

2526
@SpringBootApplication
27+
@ConfigurationPropertiesScan
2628
public class SampleActuatorApplication {
2729

2830
public static void main(String[] args) {

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/src/main/java/smoketest/propertyvalidation/SamplePropertyValidationApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
import org.springframework.boot.CommandLineRunner;
2020
import org.springframework.boot.autoconfigure.SpringBootApplication;
2121
import org.springframework.boot.builder.SpringApplicationBuilder;
22+
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
2223
import org.springframework.context.annotation.Bean;
2324
import org.springframework.validation.Validator;
2425

2526
@SpringBootApplication
27+
@ConfigurationPropertiesScan
2628
public class SamplePropertyValidationApplication implements CommandLineRunner {
2729

2830
private final SampleProperties properties;

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/src/main/java/smoketest/test/SampleTestApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818

1919
import org.springframework.boot.SpringApplication;
2020
import org.springframework.boot.autoconfigure.SpringBootApplication;
21+
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
2122

2223
/**
2324
* Sample application to demonstrate testing.
2425
*
2526
* @author Phillip Webb
2627
*/
2728
@SpringBootApplication
29+
@ConfigurationPropertiesScan
2830
public class SampleTestApplication {
2931

3032
// NOTE: this application will intentionally not start without MySQL, the test will

0 commit comments

Comments
 (0)