您现在的位置是:首页 > java技术交流java技术交流
mybatis plus3.3.2配置打印sql
上善若水2020-06-30 16:47:10【java技术交流】 3335人已围观
简介如何配置mybatis plus配置打印sql,控制台输出配置显示sql语句进行调试程序如何配置,如何配置mybatis,实测使用mybatis-plus-boot-starter3.3.2成功打印.
如何配置mybatis plus配置打印sql,控制台输出配置显示sql语句进行调试程序如何配置,如何配置mybatis,实测使用mybatis-plus-boot-starter3.3.2成功打印.
解决方案
如果是application.yml
#mybatis-plus配置控制台打印完整带参数SQL语句
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
如果是application.properties,添加
#mybatis-plus配置控制台打印完整带参数SQL语句
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
输出效果
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@70721c12] was not registered for synchronization because synchronization is not active
JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@388d14e] will not be managed by Spring
==> Preparing: SELECT id,category_id,cover,title,introduction,content,top,recommend,hot,browse,up,create_time,update_time FROM article
==> Parameters:
<== Columns: id, category_id, cover, title, introduction, content, top, recommend, hot, browse, up, create_time, update_time
<== Row: 1, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, thymeleaf中th:text和th:utext的区别, thymeleaf中th:text和th:utext的区别, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 2, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, 【Thymeleaf】格式化日期, 【Thymeleaf】格式化日期, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 3, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 4, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 5, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 6, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 7, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 8, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 9, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 10, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 11, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 12, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 13, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 14, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 15, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 16, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 17, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 18, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 19, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 20, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 21, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 22, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 23, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 24, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 25, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 26, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 27, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 28, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 29, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 30, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 31, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 32, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 33, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 34, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 35, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 36, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 37, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 38, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 39, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 40, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 41, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 42, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 43, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 44, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 45, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 46, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 47, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 48, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 49, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 50, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 51, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 52, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 53, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 54, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Row: 55, 1, https://p5.gexing.com/GSF/shaitu/20180318/1157/5aade3c1302d2.jpg, Spring Boot 2.2.7, Spring Boot 2.2.7, <<BLOB>>, 0, 0, 0, 1, 0, 2020-05-06 14:39:06, 2020-05-06 14:39:10
<== Total: 55
Tags: mybatis plus
很赞哦! (7)
相关文章
随机图文
-
史上最强笑话二十则,让人笑到肚子疼
一、一个IT经理走进一家拉面馆,问:请问你们需要客户端吗?界面似乎还有点陈旧啊。老板一愣:面一般是伙计端,忙的时候才需要客户端。界面……界面绝对是新鲜的啊,不过排骨是昨天的。二、如果你给我的,和你给别人的是一样的,那我就不要了。食堂阿姨甩起大勺:“你到底要不要?要不要?”三、小时候每次走夜路,我都会感觉总有人跟踪我,于是养成了走几步就猛一回头的习惯,十年之后,我成了一名探戈老师。四、电 -
'com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor' is deprecated idea提示被弃用
‘com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor’isdeprecatedidea提示被弃用,今天升级了myba -
springboot 自带定时任务
定时执行是比较常见的功能,springboot自带了定时执行,上手第一个hello cron第一个定时脚本执行… 搭建springboot项目编写需要执行cron定时脚本添加注解加入容器以及开启定时脚 -
layui面包屑消失 layui刷新后丢失 时而显示时而隐藏bug
今天在使用layui面包屑layui-breadcrumb时,多次刷新会出现时而显示时而消失不显示的bug,layui刷新后丢失面包屑,发现问题,找到解决方法,给大家分享下.原因是为调用elemen