瀏覽代碼

oss-store 的 OssProperties 添加一个 consolePort 字段用于指定 oss-console 的 rpc 端口

reghao 5 月之前
父節點
當前提交
4a6578a9f0

+ 3 - 2
oss-store/bin/oss.yml

@@ -3,11 +3,12 @@ server:
     basedir: /opt/tmp/tomcat
 spring:
   datasource:
-    url: jdbc:mysql://localhost:3306/reghao_oss_tdb?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8
+    url: jdbc:mysql://localhost/reghao_oss_rdb?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8
     username: dev
     password: Dev@123456
 oss:
   store-host: 127.0.0.1
   store-dirs:
-    - /opt/disk/13f654c8-af87-4710-aac9-7aa086c99aec/
+    - /disk/13f654c8-af87-4710-aac9-7aa086c99aec/
   console-host: 127.0.0.1
+  console-port: 6104

+ 1 - 1
oss-store/src/main/java/cn/reghao/oss/store/config/DubboServiceConfig.java

@@ -20,7 +20,7 @@ public class DubboServiceConfig {
     public ConsoleService consoleService(OssProperties ossProperties) {
         RemoteService<ConsoleService> remoteService = new RemoteService<>();
         String host = ossProperties.getConsoleHost();
-        int port = 14030;
+        int port = ossProperties.getConsolePort();
         return remoteService.getService(host, port, ConsoleService.class);
     }
 

+ 1 - 0
oss-store/src/main/java/cn/reghao/oss/store/config/props/OssProperties.java

@@ -19,4 +19,5 @@ public class OssProperties {
     private String storeHost;
     private List<String> storeDirs;
     private String consoleHost;
+    private Integer consolePort;
 }

+ 3 - 2
oss-store/src/main/resources/application-dev.yml

@@ -6,5 +6,6 @@ spring:
 oss:
   store-host: 127.0.0.1
   store-dirs:
-    - /opt/disk/13f654c8-af87-4710-aac9-7aa086c99aec/
-  console-host: 127.0.0.1
+    - /disk/13f654c8-af87-4710-aac9-7aa086c99aec/
+  console-host: 127.0.0.1
+  console-port: 6104

+ 4 - 4
oss-store/src/main/resources/application-test.yml

@@ -4,8 +4,8 @@ spring:
     username: test
     password: Test@123456
 oss:
-  store-host: 192.168.0.210
+  store-host: 127.0.0.1
   store-dirs:
-    - /opt/oss/disk/13f654c8-af87-4710-aac9-7aa086c99aec/
-    - /opt/oss/disk/40b2cf6e-1501-421a-b7b3-9cbf5b206d39/
-  console-host: 192.168.0.210
+    - /disk/13f654c8-af87-4710-aac9-7aa086c99aec/
+  console-host: 127.0.0.1
+  console-port: 6104