Commit 73395731 authored by 邱美昌's avatar 邱美昌

1

parent 0388091a
......@@ -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) {
......
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