首页 > 其他分享 >SpringBoot中mybatis的相关配置

SpringBoot中mybatis的相关配置

时间:2023-01-04 23:56:41浏览次数:45  
标签:xml mapper SpringBoot 配置 classpath mybatis config

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

标签:xml,mapper,SpringBoot,配置,classpath,mybatis,config
From: https://www.cnblogs.com/maomao777/p/17026342.html

相关文章