整合參考: https://www.cnblogs.com/pxblog/p/14445162.html
顯示
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
不顯示
configuration:
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
如果沒有,就指定下級別
# 日志配置
logging:
level:
com.test: debug
org.springframework: warn
com.test是類所在的包名
mybatis-plus:
#掃描mapper文件所在位置
mapper-locations: classpath*:mapper/**/*Mapper.xml
#可以指定實體類所在包路徑
typeAliasesPackage: com.ruoyi.**.domain
global-config:
banner: false
db-config:
# 主鍵類型 0:數據庫ID自增 1.未定義 2.用戶輸入 3 id_worker 4.uuid 5.id_worker字符串表示
id-type: AUTO
#字段策略 0:"忽略判斷",1:"非 NULL 判斷"),2:"非空判斷"
field-strategy: NOT_NULL
# 默認數據庫表下划線命名
table-underline: true
config-location: classpath:mybatis/mybatis-config.xml
# configuration:
# map-underscore-to-camel-case: false
# cache-enabled: true #配置的緩存的全局開關
# lazyLoadingEnabled: true #延時加載的開關
# multipleResultSetsEnabled: true #開啟的話,延時加載一個屬性時會加載該對象全部屬性,否則按需加載屬性
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #打印sql語句,調試用