mybatis打印日志
mybatis-plus: configuration: #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl map-underscore-to-camel-case: true cache-enabled: false global-config: db-config: column-underline: true db-type: mysql refresh: false
添加配置文件
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl加了这个只能在控制台打印sql以及结果,不会将sql打印到文件里
如果要打印到文件里
在log.xml配置
<logger name="com.hotent.api.mapper" level="TRACE" />
如果不需要打印结果 ,只需要sql和参数
<logger name="com.hotent.api.mapper" level="DEBUG"/>