在项目中引入了freemarker的依赖包。但是在log4j.properties文件中没有配置对应的日志级别引起的红色警告。如下:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
log4j:WARN No appenders could be found for logger (freemarker.cache).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
解决方法:log4j.properties加上对应配置即可
log4j.logger.freemarker.cache=ERROR
log4j.logger.freemarker.beans=ERROR