anderx лет назад: 2
Родитель
Сommit
2ef9212172
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      src/main/java/com/goafanti/common/service/PovertyService.java

+ 3 - 0
src/main/java/com/goafanti/common/service/PovertyService.java

@@ -7,6 +7,7 @@ import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
 import org.jsoup.select.Elements;
+import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -17,6 +18,8 @@ import java.util.List;
 @Service
 public class PovertyService {
     private static final String   gx_url="http://fpb.gxxw.cn/index.php?m=check&c=index&a=list_jdlk&name=";
+
+    @CacheEvict(value = "selectPoverty", key = "'selectPoverty:Key:'+#key")
     public Object selectPoverty(MultipartFile file) {
         NewExcelUtil<InputPoverty> newExcelUtil=new NewExcelUtil<>(InputPoverty.class);
         List<InputPoverty> list = null;