feat: There is no way the ocr
This commit is contained in:
@@ -13,6 +13,9 @@ server.port=9999
|
|||||||
#主服务session超时
|
#主服务session超时
|
||||||
server.servlet.session.timeout =600
|
server.servlet.session.timeout =600
|
||||||
|
|
||||||
|
#tomcat /resource/local/version-manager 创建tomcat指定临时目录
|
||||||
|
server.tomcat.basedir=/resource/local/version-manager
|
||||||
|
|
||||||
# http-only
|
# http-only
|
||||||
server.session.cookie.http-only=true
|
server.session.cookie.http-only=true
|
||||||
spring.mvc.async.request-timeout=20000
|
spring.mvc.async.request-timeout=20000
|
||||||
|
|||||||
@@ -164,7 +164,11 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
|
|||||||
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename();
|
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename();
|
||||||
saveWordFilePath=ocrFilePath+saveWordFileName;
|
saveWordFilePath=ocrFilePath+saveWordFileName;
|
||||||
logger.info(saveWordFilePath);
|
logger.info(saveWordFilePath);
|
||||||
FileUtils.copyInputStreamToFile(wordFile.getInputStream(),new File(saveWordFilePath));
|
//生成保存文件
|
||||||
|
File saveWordFile = new File(saveWordFilePath);
|
||||||
|
System.out.println(saveWordFile);
|
||||||
|
wordFile.transferTo(saveWordFile);
|
||||||
|
// FileUtils.copyInputStreamToFile(wordFile.getInputStream(),new File(saveWordFilePath));
|
||||||
// savePic(wordFile.getInputStream(),saveWordFilePath);
|
// savePic(wordFile.getInputStream(),saveWordFilePath);
|
||||||
logger.info("word存储完成");
|
logger.info("word存储完成");
|
||||||
}
|
}
|
||||||
@@ -174,7 +178,10 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
|
|||||||
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename();
|
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename();
|
||||||
saveJsonFilePath=ocrFilePath+saveJsonFileName;
|
saveJsonFilePath=ocrFilePath+saveJsonFileName;
|
||||||
logger.info(saveJsonFilePath);
|
logger.info(saveJsonFilePath);
|
||||||
FileUtils.copyInputStreamToFile(jsonFile.getInputStream(),new File(saveJsonFilePath));
|
File saveJsonFile = new File(saveJsonFilePath);
|
||||||
|
System.out.println(saveJsonFile);
|
||||||
|
wordFile.transferTo(saveJsonFile);
|
||||||
|
// FileUtils.copyInputStreamToFile(jsonFile.getInputStream(),new File(saveJsonFilePath));
|
||||||
// savePic(jsonFile.getInputStream(),saveJsonFilePath);
|
// savePic(jsonFile.getInputStream(),saveJsonFilePath);
|
||||||
logger.info("Json存储完成");
|
logger.info("Json存储完成");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user