我想使用Spring Cache存储自定义对象的映射。 我有一个如下的accountKey类
public class accountKey {
private String accountNumber;
private Date date;
}
我想用作键的。而List<Transaction>
是地图的值。
因此,我要缓存的数据将像Map<accountKey,List<Transaction>>
这样。
有人可以指导我吗?
我已经看过How to cache a complex object such as Map<String,List<Car>> in a Spring Boot app