我在spring boot中有application-local.properties和application-dev.properties,其值如下:
logging.level.file=INFO
在另一个属性文件log4j.properties中,我希望根据我的运行环境获得上述值。我试着用左
${logging.level.file}
,但我没有得到它(空字符串)。
我该怎么做?
答案 0 :(得分:0)
这并不容易。默认情况下,Spring-Boot附带Logback配置。但是,也有可能激活log4j,这将在以下主题中讨论:Log4j.properties in Spring boot。