@Cacheable

来源:互联网 发布:ios开发者必备软件 编辑:程序博客网 时间:2024/05/29 04:41

import org.springframework.cache.annotation.Cacheable;

@Cacheable(CacheNames.COMMON)

 public Common getCommon(String attr)
    {}


@Cacheable是根据参数attr的值缓存的,如果参数是类,需要复写toString()方法才能缓存。

0 0
原创粉丝点击