mybatis-plus和mybatis的驼峰命名法映射

在使用mybatis-plus的驼峰命名法映射是默认是自动开启的

需要关掉它就map-underscore-to-camel-case:的属性换成false
mybatis-plus:
  configuration:
    #在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射 
      map-underscore-to-camel-case:  false

在使用mybatis的开启驼峰命名法映射

需要开启它就map-underscore-to-camel-case:的属性换成true
mybatis:
  configuration:
    #在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射 
      map-underscore-to-camel-case:  true

需要关闭它的时候把true换成false就好

猜你喜欢

转载自blog.csdn.net/weixin_45417754/article/details/126453901