I am using spring-4.3.
@Cacheable("productCategories")
@Override
public ProductCategory get(Object id) throws BeanNotFoundException {
return super.get(id);
}
@Cacheable("productCategoryChildren")
public List<ProductCategory> getChildren(String parentId) {
return productCategoryDao.getChildren(parentId);
}
First i invoke get("100")
and return a entity, and then invoke getChildren("100")
, i get a error java.lang.ClassCastException: com.jxs.ms.entity.ProductCategory cannot be cast to java.util.List
. Is this two method use the same cache to store value?