Browse Source

fix:文件服务和消息服务接口地址修改

wangmh 7 years ago
parent
commit
75aeef5175

+ 2 - 1
sso-server/src/main/java/com/uas/sso/service/impl/RestSmsServiceImpl.java

@@ -38,7 +38,8 @@ public class RestSmsServiceImpl implements SmsService {
     /**
      * 短信服务主机地址
      */
-    private String SMS_CONSOLE_HOST = "http://10.10.100.136:8080";
+    @Value("${message.url}")
+    private String SMS_CONSOLE_HOST;
 
     /**
      * 发送短信给单个人url

+ 34 - 5
sso-server/src/main/java/com/uas/sso/util/FileUrl.java

@@ -1,35 +1,64 @@
 package com.uas.sso.util;
 
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+
 /**
  * 文件服务器的基本链接
  *
  * @author yuj 2017-10-12 14:53
  */
+@Configuration
 public class FileUrl {
 
     /**
      * 文件上传
      */
-    public final static String FILE_UPLOAD = "http://10.10.100.200:9999/file/upload";
+    public static String FILE_UPLOAD;
 
 
     /**
      * 文件下载
      */
-    public final static String FILE_DOWNLOAD = "http://10.10.100.200:9999/file/download";
+    public static String FILE_DOWNLOAD;
 
     /**
      * 文件删除
      */
-    public final static String FILE_DELETE = "http://10.10.100.200:9999/file/delete";
+    public static String FILE_DELETE;
 
     /**
      * 文件信息
      */
-    public final static String FILE_INFO = "http://10.10.100.200:9999/file/info";
+    public static String FILE_INFO;
 
     /**
      * 文件额外属性
      */
-    public final static String FILE_METADATA = "http://10.10.100.200:9999/file/metadata";
+    public static String FILE_METADATA;
+
+    @Value("${file.url}")
+    public void setFileUpload(String param) {
+        FILE_UPLOAD = param + "file/upload";
+    }
+
+    @Value("${file.url}")
+    public void setFileDownload(String param) {
+        FILE_DOWNLOAD = param + "file/download";
+    }
+
+    @Value("${file.url}")
+    public void setFileDelete(String param) {
+        FILE_DELETE = param + "file/delete";
+    }
+
+    @Value("${file.url}")
+    public void setFileInfo(String param) {
+        FILE_INFO = param + "file/info";
+    }
+
+    @Value("${file.url}")
+    public void setFileMetadata(String param) {
+        FILE_METADATA = param + "file/metadata";
+    }
 }

+ 4 - 0
sso-server/src/main/resources/config/application-dev.properties

@@ -21,4 +21,8 @@ datasource.connectionProperties=druid.stat.mergeSql=false;druid.stat.slowSqlMill
 spring.redis.host=192.168.253.6
 spring.redis.port=6379
 
+message.url = http://10.10.100.136:8080/
+
+file.url = http://10.10.100.200:9999/
+
 zk.url=zookeeper://10.10.100.11:2181

+ 4 - 0
sso-server/src/main/resources/config/application-pre.properties

@@ -21,4 +21,8 @@ datasource.connectionProperties=druid.stat.mergeSql=false;druid.stat.slowSqlMill
 spring.redis.host=192.168.78.4
 spring.redis.port=6379
 
+message.url = http://message.ubtob.com/
+
+file.url = http://dfs-api.ubtob.com/
+
 zk.url=zookeeper://10.10.100.11:2181

+ 4 - 0
sso-server/src/main/resources/config/application-prod.properties

@@ -21,4 +21,8 @@ datasource.connectionProperties=druid.stat.mergeSql=false;druid.stat.slowSqlMill
 spring.redis.host=10.10.100.200
 spring.redis.port=6379
 
+message.url = http://10.10.100.136:8080/
+
+file.url = http://10.10.100.200:9999/
+
 zk.url=zookeeper://10.10.100.11:2181

+ 4 - 0
sso-server/src/main/resources/config/application-test.properties

@@ -21,4 +21,8 @@ datasource.connectionProperties=druid.stat.mergeSql=false;druid.stat.slowSqlMill
 spring.redis.host=192.168.253.6
 spring.redis.port=6379
 
+message.url = http://10.10.100.136:8080/
+
+file.url = http://10.10.100.200:9999/
+
 zk.url=zookeeper://10.10.100.11:2181