【发布时间】:2017-05-05 05:04:24
【问题描述】:
我正在尝试为生产环境进行设置,所以我想将log4j.properties 保留在我的应用程序 jar 文件之外。
为此,我将application.properties 和log4j.properties 文件与我的spring-boot jar 文件保持平行。我在我的 application.properties 中给出了logging.config: file:log4j.properties。这似乎不起作用。 Spring 仍在拾取放在 jar 文件中的 log4j.properties 文件。
我尝试在logging.config 属性中提供绝对路径,例如C:\Users\furquan\project\jars\log4j.properties,但它仍然是正在使用的 log4j.properties 是 jar 文件中的那个。
请帮忙,很重要!!!
【问题讨论】:
-
如果没有,则必须放入特定目录:
src/main/resources/log4j.properties。
标签: spring logging spring-boot log4j properties-file