1.在build.gradle文件中加入如下配置:
def env = System.getProperty("env") ?: "dev"
sourceSets {
main {
resources {
srcDirs = ["src/main/resources", "src/main/resources/profile/$env"]
}
}
}
def env = System.getProperty("env") ?: "dev"
sourceSets {
main {
resources {
srcDirs = ["src/main/resources", "src/main/resources/profile/$env"]
}
}
}