02-常用配置

nobility 发布于 2022-05-03 307 次阅读


常用配置

配置 描述
mybatis-plus.config-location MyBatis配置文件位置,不能与configuration共存,比如:classpath:mybatis-config.xml
mybatis-plus.mapperLocations MyBatis Mapper所对应的XML文件位置,比如:["classpath*:/mapper/**/*.xml"]Maven 多模块项目的扫描路径需以 classpath*: 开头 (即加载多个 jar 包下的 XML 文件)
mybatis-plus.type-enums-package MyBatis别名包扫描路径,注册后可不在Mapper.xml中使用类全限定名
mybatis-plus.configuration.map-underscore-to-camel-case 是否开启自动驼峰命名转换,默认开启
mybatis-plus.global-config.db-config.insert-strategy
mybatis-plus.global-config.db-config.update-strategy
mybatis-plus.global-config.db-config.select-strategy
字段验证策略,默认是not_null:实体属性为null自动忽略
ignored:实体属性为null也会插入
not_empty:实体属性为null或空串都会被忽略
mybatis-plus.global-config.db-config.table-prefix mybatis-plus.global-config.db-config.table-prefix
此作者没有提供个人介绍
最后更新于 2022-05-03