# 配置与自动化配置
自动化配置时,框架完全继承了mybatis-spring-boot-starter的配置属性
mybatis-milu在MiluConfiguration中增加了以下参数:
- identifierWrapQuote 标识符(表名、字段名)是否使用引号包装。如user_name -> "user_name" 或 `user_name`,默认为true
- createEntityResultMap 自动创建实体对应的ResultMap
- autoSetupColumnJdbcType 自动设置字段的jdbcType
- defaultExampleQueryConverter 设置全局的example查询中查询参数值转换器,设置值为ExampleQueryConverter的实现类
- defaultLogicDeleteProvider 设置全局的逻辑删除值提供者,设置值为LogicDeleteProvider的实现类
- configurationProperties.idGenerator 全局默认主键构建器
- configurationProperties.exampleQueryConverter 全局默认Example查询的参数转换器,值为全路径类名
- configurationProperties.logicDeleteProvider 全局默认逻辑删除值提供器,值为全路径类名
使用starter自动化配置时,在配置文件中在以上参数前加上mybatis.即可,如mybatis.identifierWrapQuote: false
← 锁 动态实体与mapper →