How to initialize log4j with Spring Boot application?
问题 I have a Spring Boot application and I want to use log4j with this application. Problem is I have a JDBC appender like(log4j2.xml); <JDBC name="customDBAppender" tableName="mytable"> <ConnectionFactory class="com.example.logger.ConnectionFactory" method="getConnection" /> .... </JDBC> I got a static getConnection method and I need to reach my database properties(username, password) in this method. I think log4j uses reflection to create connection with this method(and even before Spring