Skip to content

Commit 71107f1

Browse files
committed
adds and tests de loading of an additional properties file for particular profiles
1 parent cdb0df2 commit 71107f1

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/main/java/cat/itacademy/barcelonactiva/lopez/pedro/s05/study/config/SpringBootConfigurationTipsApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import org.springframework.boot.ApplicationRunner;
66
import org.springframework.boot.SpringApplication;
77
import org.springframework.boot.autoconfigure.SpringBootApplication;
8+
import org.springframework.context.annotation.Bean;
89
import org.springframework.core.env.Environment;
910

1011
@Log4j2
@@ -15,6 +16,7 @@ public static void main(String[] args) {
1516
SpringApplication.run(SpringBootConfigurationTipsApplication.class, args);
1617
}
1718

19+
@Bean
1820
ApplicationRunner applicationRunner (Environment environment) {
1921
return args -> {
2022
log.info("A message from application properties: " +

src/main/resources/banner.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
,---. ,--. ,-----. ,--. ,-----. ,---.,--. ,--. ,--. ,--. ,--. ,--. ,--.
2+
' .-' ,---. ,--.--.`--',--,--, ,---. | |) /_ ,---. ,---. ,-' '-. ' .--./ ,---. ,--,--, / .-'`--' ,---.,--.,--.,--.--.,--,--.,-' '-.`--' ,---. ,--,--, ,-' '-.,--.,--.,-' '-. ,---. ,--.--.`--' ,--,--.| |
3+
`. `-.| .-. || .--',--.| \| .-. | | .-. \| .-. | .-. |'-. .-' | | | .-. || \| `-,,--.| .-. | || || .--' ,-. |'-. .-',--.| .-. || \ '-. .-'| || |'-. .-'| .-. || .--',--.' ,-. || |
4+
.-' | '-' '| | | || || |' '-' ' | '--' /' '-' ' '-' ' | | ' '--'\' '-' '| || || .-'| |' '-' ' '' '| | \ '-' | | | | |' '-' '| || | | | ' '' ' | | ' '-' '| | | |\ '-' || |
5+
`-----'| |-' `--' `--'`--''--'.`- / `------' `---' `---' `--' `-----' `---' `--''--'`--' `--'.`- / `----' `--' `--`--' `--' `--' `---' `--''--' `--' `----' `--' `---' `--' `--' `--`--'`--'
6+
`--' `---' `---'

src/main/resources/foo.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
message = "testFoo"

0 commit comments

Comments
 (0)