log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Fri Nov 15 10:44:43 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

更可恶的是没有任何出错提示。

查了一下有没有log4j依赖,log4j.properties加载在资源文件没,log4j.properties里的

log4j.logger.com.abc.dao.IStudentDao=debug,console这个部分是不是接口的全限定性类名
统统都没毛病!
但是就是不记录
最后发现mapper.xml的namespace=""这里面的值不是接口的全限定类名,因为一开始我觉得namespace不影响mybatis.xml与mapper.xml联系,不影响mybatis的执行dao,所以就没注意namespace
原来namespace的值也会影响log4j的日志记录呀,,,
正确之后:
D:\java\jdk\bin\java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:D:\BaiduNetdiskDownload\ideaIU-2017.3.6.win\lib\idea_rt.jar=52733:D:\BaiduNetdiskDownload\ideaIU-2017.3.6.win\bin -Dfile.encoding=UTF-8 -classpath D:\BaiduNetdiskDownload\ideaIU-2017.3.6.win\lib\idea_rt.jar;D:\BaiduNetdiskDownload\ideaIU-2017.3.6.win\plugins\junit\lib\junit-rt.jar;D:\BaiduNetdiskDownload\ideaIU-2017.3.6.win\plugins\junit\lib\junit5-rt.jar;D:\java\jdk\jre\lib\charsets.jar;D:\java\jdk\jre\lib\deploy.jar;D:\java\jdk\jre\lib\ext\access-bridge-64.jar;D:\java\jdk\jre\lib\ext\cldrdata.jar;D:\java\jdk\jre\lib\ext\dnsns.jar;D:\java\jdk\jre\lib\ext\jaccess.jar;D:\java\jdk\jre\lib\ext\jfxrt.jar;D:\java\jdk\jre\lib\ext\localedata.jar;D:\java\jdk\jre\lib\ext\nashorn.jar;D:\java\jdk\jre\lib\ext\sunec.jar;D:\java\jdk\jre\lib\ext\sunjce_provider.jar;D:\java\jdk\jre\lib\ext\sunmscapi.jar;D:\java\jdk\jre\lib\ext\sunpkcs11.jar;D:\java\jdk\jre\lib\ext\zipfs.jar;D:\java\jdk\jre\lib\javaws.jar;D:\java\jdk\jre\lib\jce.jar;D:\java\jdk\jre\lib\jfr.jar;D:\java\jdk\jre\lib\jfxswt.jar;D:\java\jdk\jre\lib\jsse.jar;D:\java\jdk\jre\lib\management-agent.jar;D:\java\jdk\jre\lib\plugin.jar;D:\java\jdk\jre\lib\resources.jar;D:\java\jdk\jre\lib\rt.jar;D:\搜狗高速下载\讲课代码\JavaEE\mybatis02\target\test-classes;D:\搜狗高速下载\讲课代码\JavaEE\mybatis02\target\classes;D:\maven\NewRepository\junit\junit\4.11\junit-4.11.jar;D:\maven\NewRepository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\maven\NewRepository\org\mybatis\mybatis\3.4.6\mybatis-3.4.6.jar;D:\maven\NewRepository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar;D:\maven\NewRepository\log4j\log4j\1.2.17\log4j-1.2.17.jar com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.abc.AppTest,test08
log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Fri Nov 15 10:44:43 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
[DEBUG] ==>  Preparing: select * from student where name like '%' ? '%'
[DEBUG] ==> Parameters: 三(String)
[DEBUG] <==      Total: 3
01-02 23:35