Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydl-auth
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王建峰
ydl-auth
Commits
44893f4a
Commit
44893f4a
authored
Mar 05, 2020
by
wangdayewjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
a6f8d1fb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
19 deletions
+26
-19
ComOssFacadeImpl.java
ydl-auth-security/ydl-auth-security-service/src/main/java/com/ydl/auth/service/facade/ComOssFacadeImpl.java
+2
-2
application.yml
ydl-public-base/ydl-public-base-api/src/main/resources/application.yml
+5
-5
ComOssFacadeImpl.java
ydl-public-base/ydl-public-base-service/src/main/java/com/ydl/auth/service/facade/ComOssFacadeImpl.java
+13
-6
application.yml
ydl-public-base/ydl-public-base-service/src/main/resources/application.yml
+6
-6
No files found.
ydl-auth-security/ydl-auth-security-service/src/main/java/com/ydl/auth/service/facade/ComOssFacadeImpl.java
View file @
44893f4a
...
@@ -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
);
}
}
...
...
ydl-public-base/ydl-public-base-api/src/main/resources/application.yml
View file @
44893f4a
...
@@ -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
...
...
ydl-public-base/ydl-public-base-service/src/main/java/com/ydl/auth/service/facade/ComOssFacadeImpl.java
View file @
44893f4a
...
@@ -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
);
//设短一点防止交叉时间取不到
...
...
ydl-public-base/ydl-public-base-service/src/main/resources/application.yml
View file @
44893f4a
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment