常用配置

mybatis-plus:
  type-aliases-package: com.itheima.mybatis_plus.pojo  # 实体类的位置
  mapper-locations: classpath*:mapper/**/*.xml  # mapper文件的位置
  configuration:
    map-underscore-to-camel-case: true  # 开启驼峰命名
    cache-enabled: false  # 关闭二级缓存
  global-config:
    db-config:
      id-type: auto  # 主键策略: 自增
      update-strategy: not_null  # 更新策略: 非空字段更新

最后更新于

这有帮助吗?