mybatis-plus的配置

mybatis-plus:
  mapper-locations: classpath:/mapper/*Mapper.xml
  #实体扫描,多个package用逗号或者分号分隔
  typeAliasesPackage: com.baomidou.springboot.db.entity
  typeEnumsPackage: com.baomidou.springboot.db.entity.enums
  global-config:
    #刷新mapper 调试神器
    db-config:
      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
      id-type: id_worker
      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
      field-strategy: not_empty
      #驼峰下划线转换
      column-underline: true
      #数据库大写下划线转换
      #capital-mode: true
      #逻辑删除配置
      logic-delete-value: Y
      logic-not-delete-value: N
      db-type: mysql
    refresh: true
    sql-injector: com.baomidou.mybatisplus.extension.injector.LogicSqlInjector
      #自定义填充策略接口实现
      #meta-object-handler: com.baomidou.springboot.xxx
      #自定义SQL注入器
      #sql-injector: com.baomidou.springboot.xxx
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false
发布了20 篇原创文章 · 获赞 14 · 访问量 7505

猜你喜欢

转载自blog.csdn.net/weixin_44467567/article/details/102821974