您好,欢迎来到九壹网。
搜索
您的当前位置:首页mybatis-plus在控制台打印SQL语句的方法

mybatis-plus在控制台打印SQL语句的方法

来源:九壹网
mybatis-plus在控制台打印SQL语句的⽅法

⽅法⼀、在application.yml添加配置

mybatis-plus: configuration:

#默认不显⽰SQL⽇志

# log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

⽅法⼆、 mapper增加⽇志等级为debug

logging: level:

com.xxx.mapper: debug

mybaits相关配置

mybatis-plus:

mapper-locations: classpath*:cn/demo/**/mapping/*.xml, classpath:/META-INF/modeler-mybatis-mappings/*.xml configuration:

map-underscore-to-camel-case: true cache-enabled: true

lazy-loading-enabled: true

multiple-result-sets-enabled: true #默认不显⽰SQL⽇志

# log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl global-config: banner: false db-config:

id-type: assign_id table-underline: true enable-sql-runner: true configuration-properties: prefix:

blobType: BLOB boolValue: TRUE

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 91gzw.com 版权所有 湘ICP备2023023988号-2

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务