java导出excel超时_解决java POI导入Excel超时问题

@Servicepublic class MedicineListServiceImpl extends ServiceImplimplements MedicineListService {

@ResourceprivateMedicineListMapper medicineListMapper;private static Logger logger = LoggerFactory.getLogger(MedicineListService.class);

@Autowiredprivate StringRedisTemplate redisTemplate;

public JSONObject importNodeInfo(InputStream in) throws Exception {

redisTemplate.opsForValue().set("isFinished","0",60*60l,TimeUnit.SECONDS);

JSONObject json= new JSONObject();

json.put("msg", "后台正在导入,请稍等!");

json.put("status", true);newThread() {

@Overridepublic voidrun() {try{//根据类型进行分流导入

String str0 = "";

String str= "";

String fstr= "";int operCount = 0;

XSSFWorkbook workbook= new XSSFWorkbook(in);

XSSFShee

你可能感兴趣的:(java导出excel超时)