Skip to content

Commit b9d34bf

Browse files
letcodespeakmaibin
authored andcommitted
BAEL-2569 (eugenp#6679)
* BAEL-2569 : EnvironmentPostProcessor in Spring Boot * BAEL-2569 add test * BAEL-2569 update test * BAEL-2569 refactoring the class PriceCalculationEnvironmentPostProcessor * BAEL-2569: changes to class PriceCalculationEnvironmentPostProcessor * BAEL-2569 move code to spring-boot-ops module
1 parent 9ffec68 commit b9d34bf

10 files changed

Lines changed: 7 additions & 6 deletions

File tree

spring-boot/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationApplication.java renamed to spring-boot-ops/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void run(String... args) throws Exception {
3535
int quantity = Integer.valueOf(params.get(1));
3636
priceCalculationService.productTotalPrice(singlePrice, quantity);
3737
} else {
38-
logger.error("Invalid arguments " + params.toString());
38+
logger.warn("Invalid arguments " + params.toString());
3939
}
4040

4141
}

spring-boot/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessor.java renamed to spring-boot-ops/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessor.java

File renamed without changes.

spring-boot/src/main/java/com/baeldung/environmentpostprocessor/autoconfig/PriceCalculationAutoConfig.java renamed to spring-boot-ops/src/main/java/com/baeldung/environmentpostprocessor/autoconfig/PriceCalculationAutoConfig.java

File renamed without changes.

spring-boot/src/main/java/com/baeldung/environmentpostprocessor/calculator/GrossPriceCalculator.java renamed to spring-boot-ops/src/main/java/com/baeldung/environmentpostprocessor/calculator/GrossPriceCalculator.java

File renamed without changes.

spring-boot/src/main/java/com/baeldung/environmentpostprocessor/calculator/NetPriceCalculator.java renamed to spring-boot-ops/src/main/java/com/baeldung/environmentpostprocessor/calculator/NetPriceCalculator.java

File renamed without changes.

spring-boot/src/main/java/com/baeldung/environmentpostprocessor/calculator/PriceCalculator.java renamed to spring-boot-ops/src/main/java/com/baeldung/environmentpostprocessor/calculator/PriceCalculator.java

File renamed without changes.

spring-boot/src/main/java/com/baeldung/environmentpostprocessor/service/PriceCalculationService.java renamed to spring-boot-ops/src/main/java/com/baeldung/environmentpostprocessor/service/PriceCalculationService.java

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2+
com.baeldung.environmentpostprocessor.autoconfig.PriceCalculationAutoConfig
3+
4+
org.springframework.boot.env.EnvironmentPostProcessor=\
5+
com.baeldung.environmentpostprocessor.PriceCalculationEnvironmentPostProcessor
6+

spring-boot/src/test/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessorLiveTest.java renamed to spring-boot-ops/src/test/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessorLiveTest.java

File renamed without changes.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
org.springframework.boot.diagnostics.FailureAnalyzer=com.baeldung.failureanalyzer.MyBeanNotOfRequiredTypeFailureAnalyzer
2-
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3-
com.baeldung.environmentpostprocessor.autoconfig.PriceCalculationAutoConfig
4-
5-
org.springframework.boot.env.EnvironmentPostProcessor=\
6-
com.baeldung.environmentpostprocessor.PriceCalculationEnvironmentPostProcessor
72

0 commit comments

Comments
 (0)