Merge pull request #10685 from freelansam/JAVA-3030

JAVA-3030: Update "Spring Profiles" article
This commit is contained in:
Loredana Crusoveanu 2021-04-23 16:15:20 +03:00 committed by GitHub
commit 9837c22a5d
1 changed files with 28 additions and 1 deletions

View File

@ -1 +1,28 @@
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