整合参考: 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语句,调试用