spring boot [5] 打印mybatis語句

  1. 若是沒有在application.properties中配置mybatis的配置文件mybatis-config.xml:
          mybatis.config-location=classpath:mapper/config/mybatis-config.xml
    則能夠直接在application.properties中配置:
          mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImplapache

  2. 若是配置過配置文件,則只能在mybatis-config.xml配置文件中配置,不能在application.properties中配置,會報衝突的bash

<setting name="logImpl" value="org.apache.ibatis.logging.stdout.StdOutImpl"/>
複製代碼
相關文章
相關標籤/搜索