【发布时间】:2017-01-19 02:44:53
【问题描述】:
使用gradle build 命令从命令行构建时,属性字段被正确替换,但是,在使用IntelliJ IDEA IDE 时不会。
build.gradle中的代码
ext {
port = 8086
}
processResources {
filesMatching('application.properties') {
expand(project.properties)
}
}
application.properties中的代码
server.port = ${port}
【问题讨论】:
-
您的问题解决了吗?我也有同样的问题,需要在“DEBUG”中运行
-
it's not when using IntelliJ IDEA IDE
标签: java intellij-idea gradle spring-boot