diff --git a/udf-starter-file-aliyun-oss-api/src/main/java/org/itkk/udf/file/aliyun/oss/api/download/DownLoadProcessAspect.java b/udf-starter-file-aliyun-oss-api/src/main/java/org/itkk/udf/file/aliyun/oss/api/download/DownLoadProcessAspect.java index b529047..37490ce 100644 --- a/udf-starter-file-aliyun-oss-api/src/main/java/org/itkk/udf/file/aliyun/oss/api/download/DownLoadProcessAspect.java +++ b/udf-starter-file-aliyun-oss-api/src/main/java/org/itkk/udf/file/aliyun/oss/api/download/DownLoadProcessAspect.java @@ -10,7 +10,6 @@ import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; -import org.itkk.udf.cache.redis.CacheRedisProperties; import org.itkk.udf.core.ApplicationConfig; import org.itkk.udf.core.exception.SystemRuntimeException; import org.itkk.udf.core.utils.ZipUtil; @@ -40,7 +39,7 @@ public class DownLoadProcessAspect { /** * DOWNLOAD_CACHE_PREFIX */ - public static final String DOWNLOAD_CACHE_PREFIX = ":DOWNLOAD_CACHE:"; + public static final String DOWNLOAD_CACHE_PREFIX = "DOWNLOAD_CACHE:"; /** * DOWNLOAD_WAITING_CACHE_EXPIRATION(待执行,执行中,缓存过期时间为1天) @@ -58,12 +57,6 @@ public class DownLoadProcessAspect { @Autowired private RedisTemplate redisTemplate; - /** - * cacheRedisProperties - */ - @Autowired - private CacheRedisProperties cacheRedisProperties; - /** * ossWarpper */ @@ -93,7 +86,7 @@ public class DownLoadProcessAspect { //获得参数 DownLoadParam param = (DownLoadParam) proceedingJoinPoint.getArgs()[0]; //获得key - String key = cacheRedisProperties.getPrefix() + DOWNLOAD_CACHE_PREFIX + param.getId(); + String key = DOWNLOAD_CACHE_PREFIX + param.getId(); //构造对象 DownloadInfo info = new DownloadInfo(); info.setId(param.getId()); diff --git a/udf-starter-file-aliyun-oss-api/src/main/java/org/itkk/udf/file/aliyun/oss/api/download/DownLoadProcessService.java b/udf-starter-file-aliyun-oss-api/src/main/java/org/itkk/udf/file/aliyun/oss/api/download/DownLoadProcessService.java index 46521c7..7b15bb7 100644 --- a/udf-starter-file-aliyun-oss-api/src/main/java/org/itkk/udf/file/aliyun/oss/api/download/DownLoadProcessService.java +++ b/udf-starter-file-aliyun-oss-api/src/main/java/org/itkk/udf/file/aliyun/oss/api/download/DownLoadProcessService.java @@ -1,6 +1,5 @@ package org.itkk.udf.file.aliyun.oss.api.download; -import org.itkk.udf.cache.redis.CacheRedisProperties; import org.itkk.udf.core.exception.ParameterValidException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; @@ -22,12 +21,6 @@ public class DownLoadProcessService { @Autowired private RedisTemplate redisTemplate; - /** - * cacheRedisProperties - */ - @Autowired - private CacheRedisProperties cacheRedisProperties; - /** * generateDownLoadId * @@ -42,7 +35,7 @@ public class DownLoadProcessService { //生成ID String id = UUID.randomUUID().toString(); //获得key - String key = cacheRedisProperties.getPrefix() + DownLoadProcessAspect.DOWNLOAD_CACHE_PREFIX + id; + String key = DownLoadProcessAspect.DOWNLOAD_CACHE_PREFIX + id; //构造对象 DownloadInfo info = new DownloadInfo(); info.setId(id); @@ -62,7 +55,7 @@ public class DownLoadProcessService { */ public DownloadInfo getDownloadInfo(String id) { //获得key - String key = cacheRedisProperties.getPrefix() + DownLoadProcessAspect.DOWNLOAD_CACHE_PREFIX + id; + String key = DownLoadProcessAspect.DOWNLOAD_CACHE_PREFIX + id; //获得缓存值 Object cacheValue = redisTemplate.opsForValue().get(key); //返回