📜  自定义缓存键java代码示例

📅  最后修改于: 2022-03-11 14:52:35.239000             🧑  作者: Mango

代码示例1
public class CustomKeyGenerator implements KeyGenerator {
 
    public Object generate(Object target, Method method, Object... params) {
        return target.getClass().getSimpleName() + "_"
          + method.getName() + "_"
          + StringUtils.arrayToDelimitedString(params, "_");
    }
}