Commit 44893f4a by wangdayewjf

fixed

parent a6f8d1fb
......@@ -41,8 +41,8 @@ public class ComOssFacadeImpl implements ComOssFacade {
String rKey = "oss_"+originalUrl;
String rStr = redisCacheStorage.sget(rKey).toString();
if(Util.isEmpty(rStr)||rStr.length()!=0){
String rStr = redisCacheStorage.get(rKey);
if(!Util.isEmpty(rStr)||rStr.length()!=0){
return ResponseFormatterHelper.success(rStr);
}
......
......@@ -7,7 +7,7 @@ spring:
profiles:
active: local
application:
name: ydl-auth-security-api
name: ydl-public-base-api
logging:
file: /opt/release/logs/test/${spring.application.name}-DEBUG.log
......@@ -24,7 +24,7 @@ spring:
profiles: local
dubbo:
application:
name: ydl-auth-security-api
name: ydl-public-base-api
registry:
id: zookeeper
address: zookeeper://127.0.0.1:2181
......@@ -37,7 +37,7 @@ spring:
profiles: dev
dubbo:
application:
name: ydl-auth-security-api
name: ydl-public-base-api
registry:
id: zookeeper
#address: zookeeper://127.0.0.1:2181
......@@ -55,7 +55,7 @@ spring:
profiles: pre
dubbo:
application:
name: ydl-auth-security-api
name: ydl-public-base-api
registry:
id: zookeeper
address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
......@@ -67,7 +67,7 @@ spring:
profiles: prod
dubbo:
application:
name: ydl-auth-security-api
name: ydl-public-base-api
registry:
id: zookeeper
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 {
String resultUrl = "";
String rKey = "oss_"+originalUrl;
String rStr = redisCacheStorage.sget(rKey).toString();
if(Util.isEmpty(rStr)||rStr.length()!=0){
String preHeader = "";
String rStr = redisCacheStorage.get(rKey);
if(!Util.isEmpty(rStr)&&rStr.length()!=0){
return ResponseFormatterHelper.success(rStr);
}
originalUrl =originalUrl.replace("http://","");
originalUrl = originalUrl.replace("https://","");
if(originalUrl.startsWith("http://")){
originalUrl =originalUrl.replace("http://","");
preHeader = "http://";
}
if(originalUrl.startsWith("https://")){
originalUrl = originalUrl.replace("https://","");
preHeader = "https://";
}
if(originalUrl.startsWith(YunYMEnum.QN_STATIC1.getValue())
||originalUrl.startsWith(YunYMEnum.QN_VIDEEO.getValue())
||originalUrl.startsWith(YunYMEnum.QN_STATIC2.getValue())
......@@ -116,7 +123,7 @@ public class ComOssFacadeImpl implements ComOssFacade {
resultUrl = ossUrlUtil.getYpyTemporaryUrl(host,key,expressedTime);
}
resultUrl = preHeader+resultUrl;
redisCacheStorage.sset(rKey,resultUrl,expressedTime-10000);//设短一点防止交叉时间取不到
......
......@@ -5,7 +5,7 @@ spring:
profiles:
active: local
application:
name: ydl-auth-security-service
name: ydl-public-base-service
dubbo:
scan:
......@@ -45,7 +45,7 @@ spring:
dubbo:
application:
name: ydl-auth-security-service
name: ydl-public-base-service
registry:
id: zookeeper
address: zookeeper://127.0.0.1:2181
......@@ -106,7 +106,7 @@ spring:
dubbo:
application:
name: ydl-auth-security-service
name: ydl-public-base-service
provider:
registry:
id: zookeeper
......@@ -146,7 +146,7 @@ spring:
dubbo:
application:
name: ydl-auth-security-service
name: ydl-public-base-service
registry:
id: zookeeper
# address: zookeeper://127.0.0.1:2181
......@@ -175,7 +175,7 @@ spring:
dubbo:
application:
name: ydl-auth-security-service
name: ydl-public-base-service
provider:
protocols:
- id: dubbo
......@@ -199,7 +199,7 @@ spring:
dubbo:
application:
name: ydl-auth-security-service
name: ydl-public-base-service
registry:
id: zookeeper
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