diff --git a/spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/error/KebabCasingDemoApplication.java b/spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/error/KebabCasingDemoApplication.java new file mode 100644 index 0000000000..7b97f97ffa --- /dev/null +++ b/spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/error/KebabCasingDemoApplication.java @@ -0,0 +1,12 @@ +package com.baeldung.error; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class KebabCasingDemoApplication { + public static void main(String[] args) { + SpringApplication.run(KebabCasingDemoApplication.class, args); + } + +} diff --git a/spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/error/configuration/MainConfiguration.java b/spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/error/configuration/MainConfiguration.java new file mode 100644 index 0000000000..cd7b513cd2 --- /dev/null +++ b/spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/error/configuration/MainConfiguration.java @@ -0,0 +1,26 @@ +package com.baeldung.error.configuration; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + *
+ * Project Name: New folder + * + * @author Zahid Khan + * @version 4/1/2023 + */ +@Configuration +@ConfigurationProperties(prefix = "profile.application-properties") +public class MainConfiguration { + private String name; + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } +} diff --git a/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.properties b/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.properties index 541183a186..e80c2ecc27 100644 --- a/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.properties +++ b/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.properties @@ -31,4 +31,13 @@ bael.property=prodValue environment.name=${OS} java.home.and.environment=${JAVA_HOME}+${OS} not.existing.system.property=${thispropertydoesnotexist} -baeldung.presentation=${HELLO_BAELDUNG}. Java is installed in the folder: ${JAVA_HOME} \ No newline at end of file +baeldung.presentation=${HELLO_BAELDUNG}. Java is installed in the folder: ${JAVA_HOME} +#--- +#camelCasing +#profile.applicationProperties.name="Baeldung" +#PascalCasing +#profile.ApplicationProperties.name="Baeldung" +#SnakingCasing +#profile.application_properties.name="Baeldung" +#KebabCasing +profile.application-properties.name="Baeldung" \ No newline at end of file