采用构造函数注入
public class ConnectionUtil{
public static RedisCache redisCache;
@Autowired
public ConnectionUtil(RedisCache _redisCache){
ConnectionUtil.redisCache=_redisCache;
}
}
采用构造函数注入
public class ConnectionUtil{
public static RedisCache redisCache;
@Autowired
public ConnectionUtil(RedisCache _redisCache){
ConnectionUtil.redisCache=_redisCache;
}
}