- log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).
- 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没有配置
#1 配置步骤:
1.在对应的项目src下新建文件 log4j.properties
2.对log4j.properties进行配置--找到mybatis的手册(具体如图所示)

3.再次运行程序,就可以出现对应的日志(如:DEBUG [main] - ==>省略 )
#2 对应的配置文件
# Global logging configuration
log4j.rootLogger=ERROR, stdout
# MyBatis logging configuration...
log4j.logger.org.mybatis.example.BlogMapper=TRACE
# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
--------------------------------欢迎吐槽!谢谢!--------------------------------------