log : gradle profile

This commit is contained in:
haerong22
2021-09-14 16:53:37 +09:00
parent 223f0ff6f0
commit 7b3e2bf60b
8 changed files with 26 additions and 5 deletions

View File

@@ -22,3 +22,13 @@ dependencies {
test {
useJUnitPlatform()
}
ext.profile = (!project.hasProperty('profile') || !profile) ? 'local' : profile
sourceSets {
main {
resources {
srcDirs "src/main/resources-env/${profile}"
}
}
}

View File

@@ -0,0 +1,6 @@
spring:
profiles:
include: common
active: dev
test: dev

View File

@@ -1,6 +1,6 @@
spring:
profiles:
include: common
active: local
common: common
test: common
test: local

View File

@@ -0,0 +1,6 @@
spring:
profiles:
include: common
active: prod
test: prod

View File

@@ -0,0 +1,2 @@
common: common
test: common

View File

@@ -1 +0,0 @@
test: dev

View File

@@ -1 +0,0 @@
test: local

View File

@@ -1 +0,0 @@
test: prod