From e67cadab7042d2d309bdec01a2aeab356397b094 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Thu, 22 Apr 2021 17:02:07 +0530 Subject: [PATCH] JAVA-3030: Update "Spring Profiles" article --- .../src/main/resources/application.properties | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/spring-core-2/src/main/resources/application.properties b/spring-core-2/src/main/resources/application.properties index cbfe3f2df2..d482330b83 100644 --- a/spring-core-2/src/main/resources/application.properties +++ b/spring-core-2/src/main/resources/application.properties @@ -1 +1,28 @@ -spring.profiles.active=@spring.profiles.active@ \ No newline at end of file +spring.profiles.active=@spring.profiles.active@ + +my.prop=used-always-in-all-profiles + +#--- +spring.config.activate.on-profile=dev +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.url=jdbc:mysql://localhost:3306/db +spring.datasource.username=root +spring.datasource.password=root + +#--- +spring.config.activate.on-profile=production +spring.datasource.driver-class-name=org.h2.Driver +spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1 +spring.datasource.username=sa +spring.datasource.password=sa + +#--- +spring.profiles.group.production=proddb,prodquartz + +#--- +spring.config.activate.on-profile=proddb +db=url_to_production_db + +#--- +spring.config.activate.on-profile=prodquartz +quartz=url_to_quartz_scheduler \ No newline at end of file