feat: There is no way the ocr

This commit is contained in:
super_liu
2021-08-31 18:02:50 +08:00
parent 41bef317c7
commit ea473ee500
2 changed files with 12 additions and 2 deletions
@@ -13,6 +13,9 @@ server.port=9999
#主服务session超时
server.servlet.session.timeout =600
#tomcat /resource/local/version-manager 创建tomcat指定临时目录
server.tomcat.basedir=/resource/local/version-manager
# http-only
server.session.cookie.http-only=true
spring.mvc.async.request-timeout=20000
@@ -164,7 +164,11 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename();
saveWordFilePath=ocrFilePath+saveWordFileName;
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);
logger.info("word存储完成");
}
@@ -174,7 +178,10 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename();
saveJsonFilePath=ocrFilePath+saveJsonFileName;
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);
logger.info("Json存储完成");
}