FastJsonRedisSerializer不支持泛型注入

yvfmudvl  于 22天前  发布在  Redis
关注(0)|答案(2)|浏览(24)

public FastJsonRedisSerializer(Class type) {
this.type = type;
}

构造只能注入class,不能注入对应的type,即使使用了
ParameterizedType pt = (ParameterizedType) genericType;

aClass = ((Class) pt.getRawType());

取到的还是上层

构造为啥不传Type进来啊?

相关问题