我有一个Spring引导应用程序,我在使用ehcache。该的Ehcache工作正常,如果我只有一个实体类,但如果我有超过1个实体类的Ehcache不工作,我得到以下错误: - java.lang.ClassCastException: com.myapp.beans.Contact cannot be cast to com.myapp.beans.Department
at com.
我只想为管理员的用户禁用缓存。所以我编写了一个方法来生成密钥,如下所示,管理员返回null。但我得到 java.lang.IllegalArgumentException异常:空键返回缓存 操作 exeption。 有什么办法可以实现吗? //a method that generates a menu for each user
@Cacheable(cacheNames = "topmenu
我有两个服务 class CustomerService {
public void removeCustomer(int customerId) {...}
}
class OrderService {
@Cacheable("orders")
public List<Order> getOrders() {...}
}
在removeCustomer(