Mybatis Plus添加SQL日志
1.application.yml中添加如下配置
mybatis-plus:
configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl
2.在logback-spring.xml中添加如下配置
<!--myibatis log configure -->
<logger name="com.ibatis" level="DEBUG" />
<!--这里扫描需要打印日志的目录-->
<logger name="com.sf.gis.solution" level="DEBUG" />