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
0388091a
Commit
0388091a
authored
Aug 17, 2021
by
shenjiaqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
0ef2723d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
build.gradle
build.gradle
+1
-1
CacheConfig.java
...com/duiba/spring/boot/starter/dsp/warmup/CacheConfig.java
+12
-0
No files found.
build.gradle
View file @
0388091a
...
@@ -38,7 +38,7 @@ allprojects {
...
@@ -38,7 +38,7 @@ allprojects {
}
}
group
=
"cn.com.duiba.boot"
group
=
"cn.com.duiba.boot"
version
=
"0.0.1
5
"
version
=
"0.0.1
6
"
}
}
subprojects
{
subprojects
{
...
...
spring-boot-starter-dsp-warmup/src/main/java/cn/com/duiba/spring/boot/starter/dsp/warmup/CacheConfig.java
View file @
0388091a
package
cn
.
com
.
duiba
.
spring
.
boot
.
starter
.
dsp
.
warmup
;
package
cn
.
com
.
duiba
.
spring
.
boot
.
starter
.
dsp
.
warmup
;
import
cn.com.duiba.boot.event.MainContextRefreshedEvent
;
import
cn.com.duiba.boot.event.MainContextRefreshedEvent
;
import
cn.com.duiba.boot.utils.AopTargetUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
...
@@ -17,6 +18,7 @@ import org.apache.commons.collections.CollectionUtils;
...
@@ -17,6 +18,7 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.aop.support.AopUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.AutoConfigureOrder
;
import
org.springframework.boot.autoconfigure.AutoConfigureOrder
;
...
@@ -76,6 +78,16 @@ public class CacheConfig {
...
@@ -76,6 +78,16 @@ public class CacheConfig {
||
packageName
.
startsWith
(
"cn.com.duiba.tuia.pangea"
)
)
{
||
packageName
.
startsWith
(
"cn.com.duiba.tuia.pangea"
)
)
{
continue
;
continue
;
}
}
// 判断类是否是代理类
if
(
AopUtils
.
isAopProxy
(
bean
))
{
try
{
bean
=
AopTargetUtils
.
getTarget
(
bean
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"代理类获取原始类失败"
);
}
}
Field
[]
fields
=
bean
.
getClass
().
getDeclaredFields
();
Field
[]
fields
=
bean
.
getClass
().
getDeclaredFields
();
if
(
fields
.
length
==
0
)
{
if
(
fields
.
length
==
0
)
{
continue
;
continue
;
...
...
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