springboot讀取mapper配置文件?
SpringBoot和mybatis整合已經(jīng)天然支持這種方式,只需要在配置文件添加多個(gè)路徑用逗號(hào)隔開(kāi)
mybatis:
mapper-locations: classpath*:com/pab/cc/fas/mapper/*Mapper*.xml,classpath*:com/pab/cc/ces/mapper/*Mapper*.xml,classpath*:com/pab/cc/ams/mapper/*Mapper*.xml
type-aliases-package: com.urthink.upfs.springbootmybatis.entity
#IDENTITY: MYSQL #取回主鍵的方式
#notEmpty: false #insert和update中,是否判斷字符串類型!=''
configuration:
#進(jìn)行自動(dòng)映射時(shí),數(shù)據(jù)以下劃線命名,如數(shù)據(jù)庫(kù)返回的"order_address"命名字段是否映射為class的"orderAddress"字段。默認(rèn)為false
map-underscore-to-camel-case: true
# 輸出SQL執(zhí)行語(yǔ)句 (log4j2本身可以輸出sql語(yǔ)句)