|
@@ -54,7 +54,7 @@ public class CacheAOP {
|
|
|
// 默认,查询缓存,不存在则set
|
|
|
Object o = redisUtil.get(key);
|
|
|
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
|
|
|
-
|
|
|
+ Class returnClass = methodSignature.getReturnType();
|
|
|
Type type = methodSignature.getMethod().getGenericReturnType();
|
|
|
//3.校验redis中是否有数据,
|
|
|
if (o != null) {
|
|
@@ -65,7 +65,7 @@ public class CacheAOP {
|
|
|
result = JsonUtils.getList(o.toString(), Class.forName(modelType.getTypeName()));
|
|
|
} else {
|
|
|
//如果是普通对象
|
|
|
- result = JsonUtils.getObject(o.toString(), type.getClass());
|
|
|
+ result = JsonUtils.getObject(o.toString(), returnClass);
|
|
|
}
|
|
|
|
|
|
} else {
|