Commit 44893f4a by wangdayewjf

fixed

parent a6f8d1fb
...@@ -41,8 +41,8 @@ public class ComOssFacadeImpl implements ComOssFacade { ...@@ -41,8 +41,8 @@ public class ComOssFacadeImpl implements ComOssFacade {
String rKey = "oss_"+originalUrl; String rKey = "oss_"+originalUrl;
String rStr = redisCacheStorage.sget(rKey).toString(); String rStr = redisCacheStorage.get(rKey);
if(Util.isEmpty(rStr)||rStr.length()!=0){ if(!Util.isEmpty(rStr)||rStr.length()!=0){
return ResponseFormatterHelper.success(rStr); return ResponseFormatterHelper.success(rStr);
} }
......
...@@ -7,7 +7,7 @@ spring: ...@@ -7,7 +7,7 @@ spring:
profiles: profiles:
active: local active: local
application: application:
name: ydl-auth-security-api name: ydl-public-base-api
logging: logging:
file: /opt/release/logs/test/${spring.application.name}-DEBUG.log file: /opt/release/logs/test/${spring.application.name}-DEBUG.log
...@@ -24,7 +24,7 @@ spring: ...@@ -24,7 +24,7 @@ spring:
profiles: local profiles: local
dubbo: dubbo:
application: application:
name: ydl-auth-security-api name: ydl-public-base-api
registry: registry:
id: zookeeper id: zookeeper
address: zookeeper://127.0.0.1:2181 address: zookeeper://127.0.0.1:2181
...@@ -37,7 +37,7 @@ spring: ...@@ -37,7 +37,7 @@ spring:
profiles: dev profiles: dev
dubbo: dubbo:
application: application:
name: ydl-auth-security-api name: ydl-public-base-api
registry: registry:
id: zookeeper id: zookeeper
#address: zookeeper://127.0.0.1:2181 #address: zookeeper://127.0.0.1:2181
...@@ -55,7 +55,7 @@ spring: ...@@ -55,7 +55,7 @@ spring:
profiles: pre profiles: pre
dubbo: dubbo:
application: application:
name: ydl-auth-security-api name: ydl-public-base-api
registry: registry:
id: zookeeper id: zookeeper
address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181 address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
...@@ -67,7 +67,7 @@ spring: ...@@ -67,7 +67,7 @@ spring:
profiles: prod profiles: prod
dubbo: dubbo:
application: application:
name: ydl-auth-security-api name: ydl-public-base-api
registry: registry:
id: zookeeper id: zookeeper
address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181 address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
......
...@@ -40,14 +40,21 @@ public class ComOssFacadeImpl implements ComOssFacade { ...@@ -40,14 +40,21 @@ public class ComOssFacadeImpl implements ComOssFacade {
String resultUrl = ""; String resultUrl = "";
String rKey = "oss_"+originalUrl; String rKey = "oss_"+originalUrl;
String preHeader = "";
String rStr = redisCacheStorage.sget(rKey).toString(); String rStr = redisCacheStorage.get(rKey);
if(Util.isEmpty(rStr)||rStr.length()!=0){ if(!Util.isEmpty(rStr)&&rStr.length()!=0){
return ResponseFormatterHelper.success(rStr); return ResponseFormatterHelper.success(rStr);
} }
originalUrl =originalUrl.replace("http://",""); if(originalUrl.startsWith("http://")){
originalUrl = originalUrl.replace("https://",""); originalUrl =originalUrl.replace("http://","");
preHeader = "http://";
}
if(originalUrl.startsWith("https://")){
originalUrl = originalUrl.replace("https://","");
preHeader = "https://";
}
if(originalUrl.startsWith(YunYMEnum.QN_STATIC1.getValue()) if(originalUrl.startsWith(YunYMEnum.QN_STATIC1.getValue())
||originalUrl.startsWith(YunYMEnum.QN_VIDEEO.getValue()) ||originalUrl.startsWith(YunYMEnum.QN_VIDEEO.getValue())
||originalUrl.startsWith(YunYMEnum.QN_STATIC2.getValue()) ||originalUrl.startsWith(YunYMEnum.QN_STATIC2.getValue())
...@@ -116,7 +123,7 @@ public class ComOssFacadeImpl implements ComOssFacade { ...@@ -116,7 +123,7 @@ public class ComOssFacadeImpl implements ComOssFacade {
resultUrl = ossUrlUtil.getYpyTemporaryUrl(host,key,expressedTime); resultUrl = ossUrlUtil.getYpyTemporaryUrl(host,key,expressedTime);
} }
resultUrl = preHeader+resultUrl;
redisCacheStorage.sset(rKey,resultUrl,expressedTime-10000);//设短一点防止交叉时间取不到 redisCacheStorage.sset(rKey,resultUrl,expressedTime-10000);//设短一点防止交叉时间取不到
......
...@@ -5,7 +5,7 @@ spring: ...@@ -5,7 +5,7 @@ spring:
profiles: profiles:
active: local active: local
application: application:
name: ydl-auth-security-service name: ydl-public-base-service
dubbo: dubbo:
scan: scan:
...@@ -45,7 +45,7 @@ spring: ...@@ -45,7 +45,7 @@ spring:
dubbo: dubbo:
application: application:
name: ydl-auth-security-service name: ydl-public-base-service
registry: registry:
id: zookeeper id: zookeeper
address: zookeeper://127.0.0.1:2181 address: zookeeper://127.0.0.1:2181
...@@ -106,7 +106,7 @@ spring: ...@@ -106,7 +106,7 @@ spring:
dubbo: dubbo:
application: application:
name: ydl-auth-security-service name: ydl-public-base-service
provider: provider:
registry: registry:
id: zookeeper id: zookeeper
...@@ -146,7 +146,7 @@ spring: ...@@ -146,7 +146,7 @@ spring:
dubbo: dubbo:
application: application:
name: ydl-auth-security-service name: ydl-public-base-service
registry: registry:
id: zookeeper id: zookeeper
# address: zookeeper://127.0.0.1:2181 # address: zookeeper://127.0.0.1:2181
...@@ -175,7 +175,7 @@ spring: ...@@ -175,7 +175,7 @@ spring:
dubbo: dubbo:
application: application:
name: ydl-auth-security-service name: ydl-public-base-service
provider: provider:
protocols: protocols:
- id: dubbo - id: dubbo
...@@ -199,7 +199,7 @@ spring: ...@@ -199,7 +199,7 @@ spring:
dubbo: dubbo:
application: application:
name: ydl-auth-security-service name: ydl-public-base-service
registry: registry:
id: zookeeper id: zookeeper
address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181 address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment