SpringBoot中mybatis的相关配置

mybatis配置

mybatis:
  # 别名,在mybatis的mapper中可以直接使用同名来代替包名 
  type-aliases-package: com.mao.springcloud.pojo
#  config-location: classpath:mybatis/mybatis-config.xml
  # 配置mybatis的mapper文件
  mapper-locations: classpath:mybatis/mapper/*.xml
  # Sql语句正茬查不出数据,显示数据结构和接口返回数据不匹配,使用这个配置将下划线的字段改为驼峰命名
  configuration:
    mapUnderscoreToCamelCase: true
posted @ 2023-01-04 23:47  没有烦恼的猫猫  阅读(201)  评论(0编辑  收藏  举报