From a0828bf3d16ec1678fc6b8383f3546ee27859fc9 Mon Sep 17 00:00:00 2001 From: kwoyke Date: Tue, 3 Nov 2020 19:07:21 +0100 Subject: [PATCH] BAEL-3704: Add missing code samples (#10226) --- .../ConfigurationScanDemoApplication.java | 14 ++++++++++++++ .../EnableConfigurationDemoApplication.java | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ConfigurationScanDemoApplication.java create mode 100644 spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/EnableConfigurationDemoApplication.java diff --git a/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ConfigurationScanDemoApplication.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ConfigurationScanDemoApplication.java new file mode 100644 index 0000000000..b2339b9980 --- /dev/null +++ b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ConfigurationScanDemoApplication.java @@ -0,0 +1,14 @@ +package com.baeldung.configurationproperties; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; + +@SpringBootApplication +@ConfigurationPropertiesScan("com.baeldung.configurationproperties") +public class ConfigurationScanDemoApplication{ + + public static void main(String[] args) { + SpringApplication.run(ConfigurationScanDemoApplication.class, args); + } +} diff --git a/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/EnableConfigurationDemoApplication.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/EnableConfigurationDemoApplication.java new file mode 100644 index 0000000000..69b8c2802b --- /dev/null +++ b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/EnableConfigurationDemoApplication.java @@ -0,0 +1,13 @@ +package com.baeldung.configurationproperties; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.EnableConfigurationProperties; + +@SpringBootApplication +@EnableConfigurationProperties(ConfigProperties.class) +public class EnableConfigurationDemoApplication { + public static void main(String[] args) { + SpringApplication.run(EnableConfigurationDemoApplication.class, args); + } +}