Authored by tanling

活动 注解redis的方式从@Autowired到@Resource

... ... @@ -30,8 +30,8 @@ import com.yoho.queue.dal.model.DrawlineActivity;
public class RedisCache {
static Logger log = LoggerFactory.getLogger(RedisCache.class);
@Resource
@Resource(name = "yhValueOperations")
YHValueOperations<String, String> yhValueOperations;
@Resource(name = "yhRedisTemplate")
YHRedisTemplate<String, String> yHRedisTemplate;
... ...
... ... @@ -31,7 +31,7 @@ public class RedisListCache {
@Resource(name = "yhRedisTemplate")
YHRedisTemplate<String, String> yHRedisTemplate;
@Autowired
@Resource(name = "yhListOperations")
YHListOperations<String, String> yhListOperations;
/**
... ...
... ... @@ -37,7 +37,7 @@ public class RedisValueCache {
@Resource(name = "yhRedisTemplate")
YHRedisTemplate<String, String> yHRedisTemplate;
@Autowired
@Resource(name = "yhValueOperations")
YHValueOperations<String, String> yhValueOperations;
/**
... ...
... ... @@ -59,10 +59,10 @@ public class CocacolaServiceImpl implements ICocacolaService {
@Resource
private ServiceCaller service;
@Autowired
@Resource(name = "yhValueOperations")
private YHValueOperations<String, String> yhValueOperations;
@Autowired
@Resource(name = "yhRedisTemplate")
private YHRedisTemplate<String, String> yhRedisTemplate;
@Override
... ...
... ... @@ -63,10 +63,10 @@ public class ICouponActivityServiceImpl implements ICouponActivityService {
@Resource
private ServiceCaller service;
@Autowired
@Resource(name = "yhValueOperations")
private YHValueOperations<String, String> yhValueOperations;
@Autowired
@Resource(name = "yhRedisTemplate")
private YHRedisTemplate<String, String> yhRedisTemplate;
@Resource
... ...