我正在使用Gradle和带有属性的application.yml在Spring Boot项目中工作。
如何在YML文件中声明属性logging.config以使用环境变量配置Logback?
logging:
config: ${PATH}/application-log.xml
这样,在:processResources任务中构建失败。我了解,Gradle尝试替换$ {...}
我尝试更改为$ {'PATH'},但出现错误:
Exception in thread "main" java.lang.IllegalArgumentException: Could not resolve placeholder ''PATH'' in string value "${'PATH'}/application-log.xml"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
预先感谢