Mybatis/Mybatis-Plus驼峰式命名映射

方法一:

在springboot配置文件application.yml中写入配置信息如下:

mybatis-plus:
  configuration:
    #在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射 address_book ---> addressBook
    map-underscore-to-camel-case: true

方法二:

通过mybatis配置文件:





    
        
        
    

java学习交流资料分享群862308434,欢迎萌新大佬们的加入。  

你可能感兴趣的:(spring,boot,java,intellij-idea)