1)控制台日志提示1
log4j:WARN No appenders could be found for logger (**** class name).
原因:
未引入log4j的依赖
解决方式:
在pom.xml中引入依赖
<dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency>
2)控制台日志提示2
log4j:WARN Please initialize the log4j system properly.
原因:
未配置log4j.properties 文件 和 logging.properties
解决方式:
在resources目录下新增properties文件
logging.properties
# # JBoss, Home of Professional Open Source. # Copyright 2012 Red Hat, Inc., and individual contributors # as indicated by the @author tags. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #