Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
spring-boot-starter-dsp
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
shenjiaqing
spring-boot-starter-dsp
Commits
73395731
Commit
73395731
authored
Aug 17, 2021
by
邱美昌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0388091a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
CacheConfig.java
...com/duiba/spring/boot/starter/dsp/warmup/CacheConfig.java
+8
-0
No files found.
spring-boot-starter-dsp-warmup/src/main/java/cn/com/duiba/spring/boot/starter/dsp/warmup/CacheConfig.java
View file @
73395731
...
...
@@ -162,6 +162,14 @@ public class CacheConfig {
// beanName----cacheFieldName
String
[]
split
=
k
.
split
(
"-"
);
Object
bean
=
applicationContext
.
getBean
(
split
[
0
]);
// 判断类是否是代理类
if
(
AopUtils
.
isAopProxy
(
bean
))
{
try
{
bean
=
AopTargetUtils
.
getTarget
(
bean
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"代理类获取原始类失败"
);
}
}
Field
[]
fields
=
bean
.
getClass
().
getDeclaredFields
();
for
(
Field
field
:
fields
)
{
if
(
field
.
getName
().
equals
(
split
[
1
])
&&
((
JSONObject
)
JSONObject
.
parse
(
JSON
.
toJSONString
(
v
))).
size
()
>
0
)
{
...
...
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