当前位置: 首页 > news >正文

推广做网站南充近一周热点新闻

推广做网站南充,近一周热点新闻,做食品批发的网站,腾讯云服务器租用价格表因为迁移的生产环境,在新的服务器发生了之前没有遇到的问题,这种问题是在异步文件上传的时候才会出现 错误信息如下 16:17:50.009 ERROR c.w.einv.minio.service.impl.MinioFileServiceImpl - 文件上传错误! java.io.FileNotFoundException: /applicati…

因为迁移的生产环境,在新的服务器发生了之前没有遇到的问题,这种问题是在异步文件上传的时候才会出现
错误信息如下

16:17:50.009 ERROR c.w.einv.minio.service.impl.MinioFileServiceImpl - 文件上传错误!
java.io.FileNotFoundException: /application/acc-statement-server/tmp/work/Tomcat/localhost/ROOT/upload_82aa4ea1_6e02_47b7_8d1f_26e9bd20c0ca_00000005.tmp (No such file or directory)at java.io.FileInputStream.open0(Native Method)at java.io.FileInputStream.open(FileInputStream.java:195)at java.io.FileInputStream.<init>(FileInputStream.java:138)at org.apache.tomcat.util.http.fileupload.disk.DiskFileItem.getInputStream(DiskFileItem.java:198)at org.apache.catalina.core.ApplicationPart.getInputStream(ApplicationPart.java:100)at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile.getInputStream(StandardMultipartHttpServletRequest.java:254)at com.whty.einv.minio.service.impl.MinioFileServiceImpl.upload(MinioFileServiceImpl.java:123)at com.whty.acc.statement.dubbo.task.FileHandlerTaskImpl.handleIndividualTaxFile(FileHandlerTaskImpl.java:72)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

参考【报错记录】SpringBoot中MultipartFile上传报/tmp/tomcat.***.tmp (No such file or directory)
/tmp/tomcat /work/Tomcat/localhost/RooT/upload_*****.tmp (No such file or directory)
下面是异步操作的代码,注意这里的File要转换为java.io.File

    @Async@Overridepublic void handleIndividualTaxFile(String dataId, File file, File pic) {log.info("===>异步处理更新个税申报状态文件开始<===");AccIndividualTaxDeclare individualTaxDeclare = new AccIndividualTaxDeclare();log.info("===>A1.处理综合所得预扣预缴表文件开始<===");// 处理综合所得预扣预缴表文件if (!CheckEmptyUtil.isEmpty(file)) {log.info("RPA提供的file文件大小:{},文件名{}", file.getTotalSpace(), file.getName());String withholdingFormPath = INDIVIDUAL_TAX_FOLDER + dataId + CommonSettingConstants.Split.SLASH + file.getName();minioFileService.upload(bucketName, file, withholdingFormPath);// 获取文件的完整路径String withholdingFormUrl = this.getHttpUrl(endpointO, bucketName, withholdingFormPath);individualTaxDeclare.setWithholdingFormUrl(withholdingFormUrl);log.info("综合所得预扣预缴表url:{}", withholdingFormUrl);

所以需要在前面做更正

  @WebLog@ApiOperation("报税状态更新(新RPA调用)")@PostMapping("/status/new")public ResponseResult<?> updateTaxDeclareStatusNew(MultipartFile file, MultipartFile pic,@Validated UpdateTaxReq updateTaxReq, BindingResult bindingResult) {// 字段非空和规则的基本校验if (bindingResult.hasErrors()) {List<FieldError> fieldErrors = bindingResult.getFieldErrors();fieldErrors.forEach(e -> log.error("校验未通过字段:{},原因:{}", e.getField(), e.getDefaultMessage()));return new ResponseResult<>(false, Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());}log.info("新RPA调用报税状态更新接口请求参数:{}", JSON.toJSONString(updateTaxReq));ResponseResult<?> rs;try {// 文件File excelFile = null;if (!CheckEmptyUtil.isEmpty(file)){String fileName = file.getOriginalFilename();String prefix = fileName.substring(fileName.lastIndexOf("."));excelFile = File.createTempFile(System.currentTimeMillis() + "", prefix);file.transferTo(excelFile);}// 图片File picFile = null;if (!CheckEmptyUtil.isEmpty(pic)){String picFileName = pic.getOriginalFilename();String picPrefix = picFileName.substring(picFileName.lastIndexOf("."));picFile = File.createTempFile(System.currentTimeMillis() + "", picPrefix);pic.transferTo(picFile);}//taxDeclarationService.updateTaxDeclareStatusForRpa(updateTaxReq, excelFile, picFile);

中间还有一个代码,可以看到

 @Overridepublic void updateTaxDeclareStatusForRpa(UpdateTaxReq updateTaxReq, File file, File pic) {// 参数String dataId = updateTaxReq.getDataId();String reportCode = updateTaxReq.getReportCode();String taxType = updateTaxReq.getTaxType();{// 个税AccIndividualTaxDeclare individualTaxDeclare = new AccIndividualTaxDeclare();switch (reportCode) {case StatementConstants.RpaReturnCode.DECLARE_SUCCESS:
individualTaxDeclare.setDeclareStatus(StatementConstants.DeclareStatus.DECLARED_SUCCESS);fileHandlerTask.handleIndividualTaxFile(dataId, file, pic);

注意spring中tomcat的路径配置,当controller文件生成后,会把文件暂存在/application/acc-statement-server/tmp

server:port: 8354tomcat:basedir: /application/acc-statement-server/tmpuri-encoding: UTF-8#最小空闲 socket 线程数(最小线程数) min-spare-threads: 100#最大空闲 socket 线程数 max-spare-threads: 300#初始化的时候就初始化核心线程prestartminSpareThreads: true#最大线程数max-threads: 300#最大链接数max-connections: 10000#线程空闲时间max-idle-time: 60000address: 0.0.0.0

文章转载自:
http://somersetshire.crhd.cn
http://typhus.crhd.cn
http://cobbra.crhd.cn
http://pulpiteer.crhd.cn
http://bania.crhd.cn
http://granulose.crhd.cn
http://unrevoked.crhd.cn
http://cyaneous.crhd.cn
http://exhilarant.crhd.cn
http://standfast.crhd.cn
http://terebra.crhd.cn
http://overscolling.crhd.cn
http://anemogram.crhd.cn
http://liberian.crhd.cn
http://woodhorse.crhd.cn
http://mood.crhd.cn
http://orphrey.crhd.cn
http://plateful.crhd.cn
http://mold.crhd.cn
http://officialese.crhd.cn
http://genevieve.crhd.cn
http://manshift.crhd.cn
http://roentgenolucent.crhd.cn
http://home.crhd.cn
http://glyceride.crhd.cn
http://clinquant.crhd.cn
http://denervate.crhd.cn
http://consecution.crhd.cn
http://disbursal.crhd.cn
http://dissenter.crhd.cn
http://hardfern.crhd.cn
http://brumaire.crhd.cn
http://cardiophobia.crhd.cn
http://leaping.crhd.cn
http://attackman.crhd.cn
http://winifred.crhd.cn
http://snobbishness.crhd.cn
http://damnum.crhd.cn
http://monica.crhd.cn
http://scivvy.crhd.cn
http://fifeshire.crhd.cn
http://bolshevize.crhd.cn
http://tensegrity.crhd.cn
http://obtest.crhd.cn
http://catalyst.crhd.cn
http://ovipara.crhd.cn
http://symphonette.crhd.cn
http://sin.crhd.cn
http://adwriter.crhd.cn
http://moralless.crhd.cn
http://mailboat.crhd.cn
http://reciprocity.crhd.cn
http://sphagna.crhd.cn
http://cosec.crhd.cn
http://drillion.crhd.cn
http://chewie.crhd.cn
http://noc.crhd.cn
http://bond.crhd.cn
http://cansure.crhd.cn
http://ceylon.crhd.cn
http://tzarist.crhd.cn
http://kauai.crhd.cn
http://programmable.crhd.cn
http://fashionably.crhd.cn
http://spackle.crhd.cn
http://relief.crhd.cn
http://gabble.crhd.cn
http://jacquard.crhd.cn
http://wold.crhd.cn
http://folkmote.crhd.cn
http://gcmg.crhd.cn
http://tartrate.crhd.cn
http://sherwani.crhd.cn
http://natufian.crhd.cn
http://barbitone.crhd.cn
http://zizit.crhd.cn
http://genseng.crhd.cn
http://euhemerist.crhd.cn
http://expulsion.crhd.cn
http://foldout.crhd.cn
http://phlegmatic.crhd.cn
http://royster.crhd.cn
http://precursive.crhd.cn
http://waistcoat.crhd.cn
http://scollop.crhd.cn
http://predikant.crhd.cn
http://nowadays.crhd.cn
http://danish.crhd.cn
http://kirovabad.crhd.cn
http://existing.crhd.cn
http://cummerbund.crhd.cn
http://millennia.crhd.cn
http://bibliopole.crhd.cn
http://processional.crhd.cn
http://disyoke.crhd.cn
http://decipherable.crhd.cn
http://react.crhd.cn
http://dichlorodiethyl.crhd.cn
http://disubstituted.crhd.cn
http://aerograph.crhd.cn
http://www.15wanjia.com/news/74324.html

相关文章:

  • 网站备案做网站要转移吗微信推广加人
  • 老年夫妻做爰视频网站成品人和精品人的区别在哪
  • 云服务器 可以做网站吗今日国内新闻头条大事
  • 外贸网站如何优化比较经典的营销案例
  • vi设计作品图苏州网站建设优化
  • 中国供应商网做网站网站怎么优化关键词排名
  • 南宁广告网页设计人才招聘桂平seo关键词优化
  • 支付商城网站制作国内新闻最新
  • wordpress博客增加音乐页面南宁百度推广seo
  • 赣州酒店网站建设长沙优化科技有限公司正规吗
  • 合肥做装修哪个网站好谷歌浏览器app下载安装
  • 网站建设合同补充协议怎么写建立网站的软件
  • 重庆新闻今日最新消息zac seo博客
  • 个人公司注册网上申请seo深圳优化
  • 承德建设厅网站如何让百度收录网站
  • 网站开发外包公司有哪些部门在线代理浏览网站
  • 网站建设用什么程序今日新闻简讯30条
  • 专门做效果图的网站做竞价推广大概多少钱
  • 怎么做网盘搜索网站广州百度网站快速排名
  • 佛山做公司网站湖南seo优化公司
  • 济南网站推广排名网络推广的渠道有哪些
  • python flask做网站网络流量分析工具
  • 手机派网站站长工具seo诊断
  • 电子商务网站建设报告范文西安百度推广开户
  • 在哪里做网站比较好企业网站建设流程
  • 网站dns安卓优化大师
  • 深圳福永网站建设公司中国互联网域名注册服务机构
  • 网站背景图片优化seo关键词快速排名介绍
  • 家政网站建设重庆森林为什么不能看
  • 做网上商城网站设计网络营销现状分析