Service类
CacheService.java
/**
@author: Administrator
*/
@Service
public class CacheService {
/**
单个 数据 缓存
@param param1
@param user
/
@RedisCache(cacheKey = "redis:cache:user:#{#user.uuid}",cacheValue = "#user")
public void insertCache(String param1, User user){
System.out.println("进入方法:insertCache");
}
/*
批量数据 缓存
@param userList
*/
@RedisCache(cacheKey = "redis:cache:user:#{#perItem.uuid}",cacheValue = "#userList",batch = true,itemName = "perItem")
public void insertCacheBatch(List userList){
}
}