在控制台上打印sql语句
mybatis:
mybatis:
# spring boot集成mybatis的方式打印sql
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
在log日志中打印
logging:
level:
com.eth.wallet.mapper: debug
本文介绍如何在SpringBoot项目中集成MyBatis并配置日志,实现SQL语句在控制台及日志文件中的打印。通过设置mybatis的log-impl属性为StdOutImpl,以及调整logging.level配置,可以详细记录数据库操作过程。
在控制台上打印sql语句
mybatis:
mybatis:
# spring boot集成mybatis的方式打印sql
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
在log日志中打印
logging:
level:
com.eth.wallet.mapper: debug
2928
1306
2279

被折叠的 条评论
为什么被折叠?