# 配置与自动化配置

自动化配置时,框架完全继承了mybatis-spring-boot-starter的配置属性

mybatis-milu在MiluConfiguration中增加了以下参数:

  1. identifierWrapQuote 标识符(表名、字段名)是否使用引号包装。如user_name -> "user_name" 或 `user_name`,默认为true
  2. createEntityResultMap 自动创建实体对应的ResultMap
  3. autoSetupColumnJdbcType 自动设置字段的jdbcType
  4. defaultExampleQueryConverter 设置全局的example查询中查询参数值转换器,设置值为ExampleQueryConverter的实现类
  5. defaultLogicDeleteProvider 设置全局的逻辑删除值提供者,设置值为LogicDeleteProvider的实现类
  6. configurationProperties.idGenerator 全局默认主键构建器
  7. configurationProperties.exampleQueryConverter 全局默认Example查询的参数转换器,值为全路径类名
  8. configurationProperties.logicDeleteProvider 全局默认逻辑删除值提供器,值为全路径类名

使用starter自动化配置时,在配置文件中在以上参数前加上mybatis.即可,如mybatis.identifierWrapQuote: false