From a6052bde9374a4771f98f1cf153aee1b8f856cca Mon Sep 17 00:00:00 2001 From: Gaetano Piazzolla Date: Thu, 22 Jun 2023 16:53:01 +0200 Subject: [PATCH] JAVA-22236 | adding new submodule due to too much articles in the same submodule. (#14286) --- spring-boot-modules/pom.xml | 1 + .../spring-boot-properties-2/README.md | 2 +- .../spring-boot-properties-3/README.md | 4 +- .../src/main/resources/application.properties | 16 +------ .../spring-boot-properties-4/README.md | 10 ++++ .../spring-boot-properties-4/pom.xml | 47 +++++++++++++++++++ .../envvariables/BaeldungProperties.java | 0 .../baeldung/envvariables/MyController.java | 0 .../error/KebabCasingDemoApplication.java | 0 .../configuration/MainConfiguration.java | 0 .../src/main/resources/application.properties | 13 +++++ .../MyControllerIntegrationTest.java | 0 12 files changed, 74 insertions(+), 19 deletions(-) create mode 100644 spring-boot-modules/spring-boot-properties-4/README.md create mode 100644 spring-boot-modules/spring-boot-properties-4/pom.xml rename spring-boot-modules/{spring-boot-properties-3 => spring-boot-properties-4}/src/main/java/com/baeldung/envvariables/BaeldungProperties.java (100%) rename spring-boot-modules/{spring-boot-properties-3 => spring-boot-properties-4}/src/main/java/com/baeldung/envvariables/MyController.java (100%) rename spring-boot-modules/{spring-boot-properties-3 => spring-boot-properties-4}/src/main/java/com/baeldung/error/KebabCasingDemoApplication.java (100%) rename spring-boot-modules/{spring-boot-properties-3 => spring-boot-properties-4}/src/main/java/com/baeldung/error/configuration/MainConfiguration.java (100%) create mode 100644 spring-boot-modules/spring-boot-properties-4/src/main/resources/application.properties rename spring-boot-modules/{spring-boot-properties-3 => spring-boot-properties-4}/src/test/java/com/baeldung/envvariables/MyControllerIntegrationTest.java (100%) diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml index d46612393d..2c82fa1611 100644 --- a/spring-boot-modules/pom.xml +++ b/spring-boot-modules/pom.xml @@ -93,6 +93,7 @@ spring-boot-properties spring-boot-properties-2 spring-boot-properties-3 + spring-boot-properties-4 spring-boot-properties-migrator-demo diff --git a/spring-boot-modules/spring-boot-properties-2/README.md b/spring-boot-modules/spring-boot-properties-2/README.md index 296486e7d7..a10d0db7d3 100644 --- a/spring-boot-modules/spring-boot-properties-2/README.md +++ b/spring-boot-modules/spring-boot-properties-2/README.md @@ -10,4 +10,4 @@ This module contains articles about Properties in Spring Boot. - [Inject Arrays and Lists From Spring Properties Files](https://www.baeldung.com/spring-inject-arrays-lists) - [Inject a Map from a YAML File with Spring](https://www.baeldung.com/spring-yaml-inject-map) - [YAML to List of Objects in Spring Boot](https://www.baeldung.com/spring-boot-yaml-list) -- More articles: [[<-- prev]](../spring-boot-properties) +- More articles: [[<-- Prev]](../spring-boot-properties) [[Next -->]](../spring-boot-properties-3) diff --git a/spring-boot-modules/spring-boot-properties-3/README.md b/spring-boot-modules/spring-boot-properties-3/README.md index 476797965a..f9bae5f12c 100644 --- a/spring-boot-modules/spring-boot-properties-3/README.md +++ b/spring-boot-modules/spring-boot-properties-3/README.md @@ -12,6 +12,4 @@ - [Log Properties in a Spring Boot Application](https://www.baeldung.com/spring-boot-log-properties) - [Using Environment Variables in Spring Boot’s application.properties](https://www.baeldung.com/spring-boot-properties-env-variables) - [Loading Multiple YAML Configuration Files in Spring Boot](https://www.baeldung.com/spring-boot-load-multiple-yaml-configuration-files) -- [Using Environment Variables in Spring Boot’s Properties Files](https://www.baeldung.com/spring-boot-properties-env-variables) -- [Spring Boot Properties Prefix Must Be in Canonical Form](https://www.baeldung.com/spring-boot-properties-canonical-form) -- More articles: [[<-- prev]](../spring-boot-properties-2) +- More articles: [[<-- Prev]](../spring-boot-properties-2) [[Next -->]](../spring-boot-properties-4) 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 225ebb05b6..a079837942 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 @@ -26,18 +26,4 @@ spring.config.activate.on-profile=multidocument-prod spring.datasource.password=password spring.datasource.url=jdbc:h2:prod spring.datasource.username=prodUser -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} -#--- -#camelCasing -#customProperties.name="Baeldung" -#PascalCasing -#CustomProperties.name="Baeldung" -#SnakingCasing -#custom_properties.name="Baeldung" -#KebabCasing -custom-properties.name="Baeldung" \ No newline at end of file +bael.property=prodValue \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-properties-4/README.md b/spring-boot-modules/spring-boot-properties-4/README.md new file mode 100644 index 0000000000..3033b8725c --- /dev/null +++ b/spring-boot-modules/spring-boot-properties-4/README.md @@ -0,0 +1,10 @@ + +## Spring Boot Properties + + + +### Relevant Articles: + +- [Using Environment Variables in Spring Boot’s Properties Files](https://www.baeldung.com/spring-boot-properties-env-variables) +- [Spring Boot Properties Prefix Must Be in Canonical Form](https://www.baeldung.com/spring-boot-properties-canonical-form) +- More articles: [[<-- Prev]](../spring-boot-properties-3) diff --git a/spring-boot-modules/spring-boot-properties-4/pom.xml b/spring-boot-modules/spring-boot-properties-4/pom.xml new file mode 100644 index 0000000000..1699e2defd --- /dev/null +++ b/spring-boot-modules/spring-boot-properties-4/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + spring-boot-properties-4 + 0.0.1-SNAPSHOT + spring-boot-properties-4 + Spring Boot Properties Module + + + com.baeldung + parent-boot-3 + 0.0.1-SNAPSHOT + ../../parent-boot-3 + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-starter-web + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/envvariables/BaeldungProperties.java b/spring-boot-modules/spring-boot-properties-4/src/main/java/com/baeldung/envvariables/BaeldungProperties.java similarity index 100% rename from spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/envvariables/BaeldungProperties.java rename to spring-boot-modules/spring-boot-properties-4/src/main/java/com/baeldung/envvariables/BaeldungProperties.java diff --git a/spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/envvariables/MyController.java b/spring-boot-modules/spring-boot-properties-4/src/main/java/com/baeldung/envvariables/MyController.java similarity index 100% rename from spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/envvariables/MyController.java rename to spring-boot-modules/spring-boot-properties-4/src/main/java/com/baeldung/envvariables/MyController.java 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-4/src/main/java/com/baeldung/error/KebabCasingDemoApplication.java similarity index 100% rename from spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/error/KebabCasingDemoApplication.java rename to spring-boot-modules/spring-boot-properties-4/src/main/java/com/baeldung/error/KebabCasingDemoApplication.java 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-4/src/main/java/com/baeldung/error/configuration/MainConfiguration.java similarity index 100% rename from spring-boot-modules/spring-boot-properties-3/src/main/java/com/baeldung/error/configuration/MainConfiguration.java rename to spring-boot-modules/spring-boot-properties-4/src/main/java/com/baeldung/error/configuration/MainConfiguration.java diff --git a/spring-boot-modules/spring-boot-properties-4/src/main/resources/application.properties b/spring-boot-modules/spring-boot-properties-4/src/main/resources/application.properties new file mode 100644 index 0000000000..a078e68820 --- /dev/null +++ b/spring-boot-modules/spring-boot-properties-4/src/main/resources/application.properties @@ -0,0 +1,13 @@ +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} +#--- +#camelCasing +#customProperties.name="Baeldung" +#PascalCasing +#CustomProperties.name="Baeldung" +#SnakingCasing +#custom_properties.name="Baeldung" +#KebabCasing +custom-properties.name="Baeldung" \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/envvariables/MyControllerIntegrationTest.java b/spring-boot-modules/spring-boot-properties-4/src/test/java/com/baeldung/envvariables/MyControllerIntegrationTest.java similarity index 100% rename from spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/envvariables/MyControllerIntegrationTest.java rename to spring-boot-modules/spring-boot-properties-4/src/test/java/com/baeldung/envvariables/MyControllerIntegrationTest.java