Mybatis-plus常见的坑@TableField不生效

# 

事件回归

  实体类定义字段中是带下划线的
  sql中字段也是带下划线的
 mybatiplus默认是打开自动转换下划线 所以导致字段为null
  
  @TableField(value="字段名") 这个注解并不生效  
  

mybatis-plus:
  #mapper扫描
mapper-locations: classpath*:mapper/**/*.xml
configuration:
  # 关闭自动驼峰转换
map-underscore-to-camel-case: false
  # 打印sql
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 
posted @ 2021-03-13 09:27  呆猫iii  阅读(7619)  评论(3)    收藏  举报