Explorar el Código

【编辑】 统一改项目内部的yml加载mybatid xml

linfutong hace 3 años
padre
commit
57b4a252c3

+ 12 - 1
zd-modules/zd-algorithm/src/main/resources/bootstrap.yml

@@ -24,4 +24,15 @@ spring:
         file-extension: yml
         # 共享配置
         shared-configs:
-          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+
+
+# mybatis配置
+mybatis:
+  # 搜索指定包别名
+  typeAliasesPackage: com.zd.alg
+  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+  mapperLocations: classpath:mapper/**/*.xml
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    call-setters-on-nulls: true

+ 1 - 1
zd-modules/zd-base/src/main/resources/bootstrap.yml

@@ -32,7 +32,7 @@ spring:
 # mybatis配置
 mybatis:
   # 搜索指定包别名
-  typeAliasesPackage: com.zd.message
+  typeAliasesPackage: com.zd.base
   # 配置mapper的扫描,找到所有的mapper.xml映射文件
   mapperLocations: classpath:mapper/**/*.xml
   configuration: