Commit 0388091a authored by shenjiaqing's avatar shenjiaqing

提交代码

parent 0ef2723d
......@@ -38,7 +38,7 @@ allprojects {
}
group = "cn.com.duiba.boot"
version = "0.0.15"
version = "0.0.16"
}
subprojects {
......
package cn.com.duiba.spring.boot.starter.dsp.warmup;
import cn.com.duiba.boot.event.MainContextRefreshedEvent;
import cn.com.duiba.boot.utils.AopTargetUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
......@@ -17,6 +18,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
......@@ -76,6 +78,16 @@ public class CacheConfig {
|| packageName.startsWith("cn.com.duiba.tuia.pangea") ) {
continue;
}
// 判断类是否是代理类
if (AopUtils.isAopProxy(bean)) {
try {
bean = AopTargetUtils.getTarget(bean);
} catch (Exception e) {
logger.error("代理类获取原始类失败");
}
}
Field[] fields = bean.getClass().getDeclaredFields();
if (fields.length == 0) {
continue;
......
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