woody hace 1 año
padre
commit
231a9eaf56

+ 14 - 2
pom.xml

@@ -5,8 +5,8 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>com.chelvc.framework</groupId>
-        <artifactId>framework-cloud-nacos-dubbo</artifactId>
+        <groupId>com.yadoucloud.framework</groupId>
+        <artifactId>framework-cloud-nacos</artifactId>
         <version>1.0.0-RELEASE</version>
         <relativePath/>
     </parent>
@@ -22,6 +22,8 @@
         <uc-server.version>1.0.0-SNAPSHOT</uc-server.version>
         <vehicle-api.version>1.0.0-SNAPSHOT</vehicle-api.version>
         <vehicle-server.version>1.0.0-SNAPSHOT</vehicle-server.version>
+        <framework-dubbo.version>1.0.0-RELEASE</framework-dubbo.version>
+        <framework-feign.version>1.0.0-RELEASE</framework-feign.version>
     </properties>
 
     <dependencies>
@@ -55,6 +57,16 @@
             <artifactId>vehicle-server</artifactId>
             <version>${vehicle-server.version}</version>
         </dependency>
+        <dependency>
+            <groupId>com.chelvc.framework</groupId>
+            <artifactId>framework-dubbo</artifactId>
+            <version>${framework-dubbo.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.chelvc.framework</groupId>
+            <artifactId>framework-feign</artifactId>
+            <version>${framework-feign.version}</version>
+        </dependency>
         <dependency>
             <groupId>com.baomidou</groupId>
             <artifactId>dynamic-datasource-spring-boot-starter</artifactId>

+ 6 - 2
src/main/java/com/chelvc/cloud/chelvc/Server.java

@@ -2,7 +2,7 @@ package com.chelvc.cloud.chelvc;
 
 import com.chelvc.cloud.admin.AdminServer;
 import com.chelvc.cloud.maintain.MaintainServer;
-import com.chelvc.cloud.uc.server.UCServer;
+import com.chelvc.cloud.uc.server.UserServer;
 import com.chelvc.cloud.vehicle.server.VehicleServer;
 import com.chelvc.framework.base.config.MultiserverMvcConfigurer;
 import com.chelvc.framework.base.context.BeanFullnameGenerator;
@@ -12,6 +12,8 @@ import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.FilterType;
 import org.springframework.context.annotation.Import;
@@ -22,13 +24,15 @@ import org.springframework.context.annotation.Import;
  * @author Woody
  * @date 2021/10/20
  */
+@EnableDiscoveryClient
 @EnableDubbo(scanBasePackages = "com.chelvc")
+@EnableFeignClients(basePackages = "com.chelvc")
 @MapperScan(basePackages = "com.chelvc.cloud.**.dao", nameGenerator = BeanFullnameGenerator.class)
 @SpringBootApplication(scanBasePackages = "com.chelvc", nameGenerator = BeanFullnameGenerator.class)
 @ComponentScan(basePackages = "com.chelvc",
         nameGenerator = BeanFullnameGenerator.class,
         excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
-                UCServer.class,
+                UserServer.class,
                 AdminServer.class,
                 VehicleServer.class,
                 MaintainServer.class

+ 22 - 22
src/main/resources/application-dev.yml

@@ -8,9 +8,9 @@ spring:
       primary: com.chelvc.cloud.uc.server
       datasource:
         "[com.chelvc.cloud.uc.server]":
-          url: jdbc:mysql://47.108.128.78:6180/uc?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
-          username: uc
-          password: Chelvc@uc!2023#
+          url: jdbc:mysql://47.108.128.78:6180/user?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
+          username: user
+          password: Chelvc@user!2023#
           hikari:
             driver-class-name: com.mysql.cj.jdbc.Driver
             pool-name: chelvc
@@ -39,26 +39,26 @@ nacos:
     server-addr: 47.108.128.78:6848
 
 oauth:
-  token:
-    secret: oauth.token.secret@chelvc!@#2023
-    recheck: true
-  client:
-    secret: chelvc@secret#2023!
-    iv: chelvc@iv#2023@
+  secret: oauth.token.secret@chelvc!@#2023
+
 upload:
-  standard:
-    path: /home/chelvc/upload
-    domain: http://file.chelvc.com
+  clients:
+    - path: /home/chelvc/upload
+      domain: http://file.chelvc.com
+      channel: LOCAL
+
 location:
-  tencent:
-    key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
-wechat:
-  appid: wx593877b3c990b15c
-  secret: 19ab92afb193b0f3c25e57ec32a3dd37
+  caching:
+    enabled: true
+  clients:
+    - key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
+      channel: TENCENT
+
 sms:
-  aliyun:
-    key: LTAI5tAnS3tQqjpHdT1KqeUw
-    secret: xs6OZj6pyJLTcNBDjp6ikftVyKRXsk
-    signature: 车旅程
   captcha:
-    template: SMS_274640619
+    template: SMS_274640619
+  clients:
+    - id: LTAI5tAnS3tQqjpHdT1KqeUw
+      secret: xs6OZj6pyJLTcNBDjp6ikftVyKRXsk
+      signature: 车旅程
+      channel: ALIYUN

+ 22 - 22
src/main/resources/application-pre.yml

@@ -8,9 +8,9 @@ spring:
       primary: com.chelvc.cloud.uc.server
       datasource:
         "[com.chelvc.cloud.uc.server]":
-          url: jdbc:mysql://127.0.0.1:6180/uc?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
-          username: uc
-          password: Chelvc@uc!2023#
+          url: jdbc:mysql://127.0.0.1:6180/user?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
+          username: user
+          password: Chelvc@user!2023#
           hikari:
             driver-class-name: com.mysql.cj.jdbc.Driver
             pool-name: chelvc
@@ -39,26 +39,26 @@ nacos:
     server-addr: 127.0.0.1:6848
 
 oauth:
-  token:
-    secret: oauth.token.secret@chelvc!@#2023
-    recheck: true
-  client:
-    secret: chelvc@secret#2023!
-    iv: chelvc@iv#2023@
+  secret: oauth.token.secret@chelvc!@#2023
+
 upload:
-  standard:
-    path: /home/chelvc/upload
-    domain: http://file.chelvc.com
+  clients:
+    - path: /home/chelvc/upload
+      domain: http://file.chelvc.com
+      channel: LOCAL
+
 location:
-  tencent:
-    key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
-wechat:
-  appid: wx593877b3c990b15c
-  secret: 19ab92afb193b0f3c25e57ec32a3dd37
+  caching:
+    enabled: true
+  clients:
+    - key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
+      channel: TENCENT
+
 sms:
-  aliyun:
-    key: LTAI5tAnS3tQqjpHdT1KqeUw
-    secret: xs6OZj6pyJLTcNBDjp6ikftVyKRXsk
-    signature: 车旅程
   captcha:
-    template: SMS_274640619
+    template: SMS_274640619
+  clients:
+    - id: LTAI5tAnS3tQqjpHdT1KqeUw
+      secret: xs6OZj6pyJLTcNBDjp6ikftVyKRXsk
+      signature: 车旅程
+      channel: ALIYUN

+ 22 - 22
src/main/resources/application-prod.yml

@@ -8,9 +8,9 @@ spring:
       primary: com.chelvc.cloud.uc.server
       datasource:
         "[com.chelvc.cloud.uc.server]":
-          url: jdbc:mysql://127.0.0.1:6180/uc?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
-          username: uc
-          password: Chelvc@uc!2023#
+          url: jdbc:mysql://127.0.0.1:6180/user?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
+          username: user
+          password: Chelvc@user!2023#
           hikari:
             driver-class-name: com.mysql.cj.jdbc.Driver
             pool-name: chelvc
@@ -39,26 +39,26 @@ nacos:
     server-addr: 127.0.0.1:6848
 
 oauth:
-  token:
-    secret: oauth.token.secret@chelvc!@#2023
-    recheck: true
-  client:
-    secret: chelvc@secret#2023!
-    iv: chelvc@iv#2023@
+  secret: oauth.token.secret@chelvc!@#2023
+
 upload:
-  standard:
-    path: /home/chelvc/upload
-    domain: http://file.chelvc.com
+  clients:
+    - path: /home/chelvc/upload
+      domain: http://file.chelvc.com
+      channel: LOCAL
+
 location:
-  tencent:
-    key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
-wechat:
-  appid: wx593877b3c990b15c
-  secret: 19ab92afb193b0f3c25e57ec32a3dd37
+  caching:
+    enabled: true
+  clients:
+    - key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
+      channel: TENCENT
+
 sms:
-  aliyun:
-    key: LTAI5tAnS3tQqjpHdT1KqeUw
-    secret: xs6OZj6pyJLTcNBDjp6ikftVyKRXsk
-    signature: 车旅程
   captcha:
-    template: SMS_274640619
+    template: SMS_274640619
+  clients:
+    - id: LTAI5tAnS3tQqjpHdT1KqeUw
+      secret: xs6OZj6pyJLTcNBDjp6ikftVyKRXsk
+      signature: 车旅程
+      channel: ALIYUN

+ 22 - 22
src/main/resources/application-test.yml

@@ -8,9 +8,9 @@ spring:
       primary: com.chelvc.cloud.uc.server
       datasource:
         "[com.chelvc.cloud.uc.server]":
-          url: jdbc:mysql://127.0.0.1:6180/uc?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
-          username: uc
-          password: Chelvc@uc!2023#
+          url: jdbc:mysql://127.0.0.1:6180/user?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
+          username: user
+          password: Chelvc@user!2023#
           hikari:
             driver-class-name: com.mysql.cj.jdbc.Driver
             pool-name: chelvc
@@ -39,26 +39,26 @@ nacos:
     server-addr: 127.0.0.1:6848
 
 oauth:
-  token:
-    secret: oauth.token.secret@chelvc!@#2023
-    recheck: true
-  client:
-    secret: chelvc@secret#2023!
-    iv: chelvc@iv#2023@
+  secret: oauth.token.secret@chelvc!@#2023
+
 upload:
-  standard:
-    path: /home/chelvc/upload
-    domain: http://file.chelvc.com
+  clients:
+    - path: /home/chelvc/upload
+      domain: http://file.chelvc.com
+      channel: LOCAL
+
 location:
-  tencent:
-    key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
-wechat:
-  appid: wx593877b3c990b15c
-  secret: 19ab92afb193b0f3c25e57ec32a3dd37
+  caching:
+    enabled: true
+  clients:
+    - key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
+      channel: TENCENT
+
 sms:
-  aliyun:
-    key: LTAI5tAnS3tQqjpHdT1KqeUw
-    secret: xs6OZj6pyJLTcNBDjp6ikftVyKRXsk
-    signature: 车旅程
   captcha:
-    template: SMS_274640619
+    template: SMS_274640619
+  clients:
+    - id: LTAI5tAnS3tQqjpHdT1KqeUw
+      secret: xs6OZj6pyJLTcNBDjp6ikftVyKRXsk
+      signature: 车旅程
+      channel: ALIYUN