Ver código fonte

feat: 切换达梦数据库

zhangying 2 semanas atrás
pai
commit
2daa04cf05

+ 221 - 0
zjrs-service-backend/META-INF/maven/org.mohrss.leaf.cloud/leaf6-uni-cloud-starter/pom.xml

@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.mohrss.leaf.cloud</groupId>
+    <artifactId>leaf6-uni-cloud-starter-parent</artifactId>
+    <version>1.0.0-SinoBest.20</version>
+    <relativePath>../leaf6-uni-cloud-starter-parent/pom.xml</relativePath>
+  </parent>
+  <groupId>org.mohrss.leaf.cloud</groupId>
+  <artifactId>leaf6-uni-cloud-starter</artifactId>
+  <version>1.0.0-SinoBest.20</version>
+  <description>Leaf6 基础框架构建工程</description>
+  <licenses>
+    <license>
+      <name>Apache License, Version 2.0</name>
+      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
+    </license>
+  </licenses>
+  <dependencies>
+    <dependency>
+      <groupId>org.mohrss.leaf.core</groupId>
+      <artifactId>leaf6-uni-common</artifactId>
+      <version>2.0.0-SinoBest.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mohrss.leaf.core</groupId>
+      <artifactId>leaf6-core-cache</artifactId>
+      <version>2.0.0-SinoBest.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mohrss.leaf.core</groupId>
+      <artifactId>leaf6-uni-security</artifactId>
+      <version>2.0.0-SinoBest.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mohrss.leaf.core</groupId>
+      <artifactId>leaf6-uni-feign</artifactId>
+      <version>2.0.0-SinoBest.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.oracle.ojdbc</groupId>
+      <artifactId>ojdbc8</artifactId>
+      <version>19.3.0.0</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.oracle.ojdbc</groupId>
+      <artifactId>orai18n</artifactId>
+      <version>19.3.0.0</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.alipay.oceanbase</groupId>
+      <artifactId>oceanbase-client</artifactId>
+      <version>1.1.10</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>druid-spring-boot-starter</artifactId>
+      <version>1.2.8</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
+      <version>2.2.4.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+      <version>2.2.4.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+      <version>2.2.4.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.thoughtworks.xstream</groupId>
+      <artifactId>xstream</artifactId>
+      <version>1.4.18</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-actuator</artifactId>
+      <version>2.3.4.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-config</artifactId>
+      <version>2.2.3.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-web</artifactId>
+      <version>2.3.4.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-security</artifactId>
+      <version>2.3.4.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-oxm</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-tx</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-jdbc</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-webmvc</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-aop</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-aspects</artifactId>
+      <version>5.3.20</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-data-redis</artifactId>
+      <version>2.3.4.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.data</groupId>
+      <artifactId>spring-data-redis</artifactId>
+      <version>2.3.4.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hibernate</groupId>
+      <artifactId>hibernate-core</artifactId>
+      <version>5.3.9.Final</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hibernate</groupId>
+      <artifactId>hibernate-entitymanager</artifactId>
+      <version>5.3.9.Final</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-mapper-asl</artifactId>
+      <version>1.9.13</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.datatype</groupId>
+      <artifactId>jackson-datatype-hibernate5</artifactId>
+      <version>2.11.2</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>redis.clients</groupId>
+      <artifactId>jedis</artifactId>
+      <version>2.9.3</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.kafka</groupId>
+      <artifactId>spring-kafka</artifactId>
+      <version>2.5.6.RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+</project>

+ 7 - 0
zjrs-service-backend/pom.xml

@@ -405,6 +405,13 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
         </dependency>
+
+        <!-- 达梦数据库引擎 -->
+        <dependency>
+            <groupId>com.dameng</groupId>
+            <artifactId>DmJdbcDriver18</artifactId>
+            <version>8.1.1.193</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 10 - 5
zjrs-service-backend/src/main/resources/application.yaml

@@ -11,7 +11,7 @@ spring:
     config: config/cache/ehcache.xml
   data:
     redis:
-      host: localhost
+      host: 192.168.0.56
       port: 6379
       password: Bowin123456
   redis:
@@ -26,10 +26,15 @@ spring:
 
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
-    url: jdbc:oracle:thin:@//192.168.0.56:1521/FREEPDB1
-    username: ZJRS_YWXT
-    password: Bowin123456
+    # Oracle
+#    driver-class-name: oracle.jdbc.OracleDriver
+#    url: jdbc:oracle:thin:@//192.168.0.56:1521/FREEPDB1
+#    username: ZJRS_YWXT
+#    password: Bowin123456
+    driver-class-name: dm.jdbc.driver.DmDriver
+    url: jdbc:dm://127.0.0.1:5236?schema=ZJZHRS&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&uppercaseAttributeName=false&columnNameUpperCase=false&lobAsString=true
+    username: SYSDBA
+    password: Bowin123
     druid:
       initial-size: 10
       max-active: 100

+ 22 - 0
zjrs-service-backend/src/main/resources/bootstrap.yml

@@ -0,0 +1,22 @@
+spring:
+  application:
+    name: zjrs-zwnw-service
+  profiles:
+    active: gsdev
+  cloud:
+    config: # config 配置
+      fail-fast: false #失败快速响应
+      discovery:
+        enabled: false #表示开启通过服务名来访问config-server
+        service-id: LEAF6-UNI-CLOUD-CONFIG #配置config 被发现名称
+      profile: ${spring.profiles.active} #active profile 用于拉取config server中配置
+      name: leaf6-uni-cloud-common,${spring.application.name}-base,${spring.application.name},datasource #application name 用于拉取config server中配置
+  zipkin:
+    #    base-url: http://192.168.0.56:9411
+    enabled: false # 禁用链路追踪
+#    enabled: true
+#    locator:
+#      discovery:
+#        enabled: false
+
+eureka.client.serviceUrl.defaultZone: http://192.168.0.56:8761/eureka/