JAVA-3030: Update "Spring Profiles" article

This commit is contained in:
sampadawagde 2021-04-22 17:02:07 +05:30
parent 45b8a5d399
commit e67cadab70
1 changed files with 28 additions and 1 deletions

View File

@ -1 +1,28 @@
spring.profiles.active=@spring.profiles.active@ 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