在mybatis的配置文件中添加

<settings>
    <!--标准日志工厂实现-->
    <srtting name="logImpl" value="STDOUT_LOGGING"/>
</settings>

名字不能写错。

SLF4J | LOG4J | LOG4J2 | JDK_LOGGING | COMMONS_LOGGING | STDOUT_LOGGING | NO_LOGGING有效值


详细可参考:https://blog.csdn.net/weixin_44592869/article/details/108509018

 https://blog.csdn.net/lesileqin/article/details/113005859?spm=1001.2101.3001.6650.10&utm_medium=distribute.wap_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-10.wap_blog_relevant_default&depth_1-utm_source=distribute.wap_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-10.wap_blog_relevant_default