缓存管理器

This commit is contained in:
2024-12-23 17:27:14 +08:00
parent ed21f91555
commit 35c6e4ed23

View File

@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
@@ -47,7 +48,7 @@ public class CommonInfoServiceImpl extends ServiceImpl<CommonInfoDao, CommonInfo
return Result.success();
}
@CachePut(key = "#type")
@Cacheable(key = "#type")
@Override
public CommonInfo findOne(int type) {
return commonInfoDao.findOne(type);