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

安琪oa协同办公系统google优化推广

安琪oa协同办公系统,google优化推广,自学织梦做网站要多久,做网站干嘛文章目录 问题现象排查解决GET加注解解决使用POST方式解决 时间戳传参失败 问题现象 项目使用的是Spring Cloud微服务,服务间调用使用的是Feign在一次服务调用时,发现GET传参丢失,没有传递过去任何参数加了RequestParam注解,发现…

文章目录

    • 问题现象
    • 排查解决
      • GET加注解解决
      • 使用POST方式解决
    • 时间戳传参失败

问题现象

  • 项目使用的是Spring Cloud微服务,服务间调用使用的是Feign
  • 在一次服务调用时,发现GET传参丢失,没有传递过去任何参数
  • 加了@RequestParam注解,发现还是传参失败
  • 传递的参数有2个,1个是一个Long类型主键ID,一个是查询VO

排查解决

GET加注解解决

  • 要使用GET只能将封装的查询VO改为一个个参数
  • 确保在Feign接口的对应请求方法上正确使用@RequestParam注解,并传入正确的参数名称
  • 确保@RequestParam注解中指定的参数类型与Feign接口中方法的参数类型一致
  • 在服务的接口方和调用方,都要使用@RequestParam注解,服务方标明接收GET请求

使用POST方式解决

  • @RequestParam针对单个参数可以使用,对于对象示例无法使用
  • 但是传递多个参数时,使用对象封装比较简单,也比较优雅
  • 这就需要使用@RequestBody注解,只能使用POST方式
  • 最终测试发现,使用POST方式传参,同时增加 @RequestBody注解,可以解决这个问题
  • 同样,在服务的接口方和调用方,都要使用@RequestBody注解,服务方标明接收POST请求

时间戳传参失败

  • 解决传参问题后,发现在传递时间戳类型timeStamp参数时,解析失败
  • 主要是格式问题,无法解析,报错如下:
2023-08-31 15:36:23.971 ERROR 78816 --- [  XNIO-1 task-7] SituationAnalysisIntersectionExtentService : getEventDetailList:
Error while extracting response for type [java.util.List<com.newatc.api.situationanalysis.vo.SituationAnalysisIntersectionVO>] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: 
Cannot deserialize value of type `java.time.Instant` from String "2023-08-31 15:35:05": Failed to deserialize java.time.Instant: (java.time.format.DateTimeParseException) Text '2023-08-31 15:35:05' could not be parsed at index 10; 
nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.time.Instant` from String "2023-08-31 15:35:05": Failed to deserialize java.time.Instant: (java.time.format.DateTimeParseException) Text '2023-08-31 15:35:05' could not be parsed at index 10at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 2, column: 17] (through reference chain: java.util.ArrayList[0]->com.newatc.api.situationanalysis.vo.SituationAnalysisIntersectionVO["timeStamp"])
  • 由于两边的程序,使用的是不同的日期参数类型,一边是Date,一边是Instant,无法调和
  • 最终决定传参市,统一使用StringYYYY-MM-dd HH:mm:ss字符串传参,问题解决

文章转载自:
http://illyria.pwrb.cn
http://mold.pwrb.cn
http://regional.pwrb.cn
http://bathing.pwrb.cn
http://admonitory.pwrb.cn
http://muskwood.pwrb.cn
http://dink.pwrb.cn
http://principate.pwrb.cn
http://latticing.pwrb.cn
http://napoo.pwrb.cn
http://homolog.pwrb.cn
http://boondocks.pwrb.cn
http://seedtime.pwrb.cn
http://emmeline.pwrb.cn
http://reemergence.pwrb.cn
http://winegrowing.pwrb.cn
http://conclave.pwrb.cn
http://mylodon.pwrb.cn
http://inflexion.pwrb.cn
http://busses.pwrb.cn
http://abysmal.pwrb.cn
http://epizooty.pwrb.cn
http://underdo.pwrb.cn
http://vanadic.pwrb.cn
http://chairone.pwrb.cn
http://podunk.pwrb.cn
http://titus.pwrb.cn
http://specification.pwrb.cn
http://cordoba.pwrb.cn
http://misesteem.pwrb.cn
http://phrenetic.pwrb.cn
http://nephrogenic.pwrb.cn
http://piggy.pwrb.cn
http://cienfuegos.pwrb.cn
http://trench.pwrb.cn
http://febricide.pwrb.cn
http://purger.pwrb.cn
http://begohm.pwrb.cn
http://wiry.pwrb.cn
http://clabber.pwrb.cn
http://malabar.pwrb.cn
http://trihydrate.pwrb.cn
http://metallothionein.pwrb.cn
http://herbary.pwrb.cn
http://brooklime.pwrb.cn
http://any.pwrb.cn
http://abortionism.pwrb.cn
http://reichspfennig.pwrb.cn
http://offish.pwrb.cn
http://whity.pwrb.cn
http://dentex.pwrb.cn
http://cannabis.pwrb.cn
http://implicity.pwrb.cn
http://foolhardiness.pwrb.cn
http://sclerotoid.pwrb.cn
http://coffeecake.pwrb.cn
http://experimentation.pwrb.cn
http://quinism.pwrb.cn
http://bretzel.pwrb.cn
http://demonography.pwrb.cn
http://technicolored.pwrb.cn
http://conqueringly.pwrb.cn
http://homomorphous.pwrb.cn
http://unequally.pwrb.cn
http://indevotion.pwrb.cn
http://neptunian.pwrb.cn
http://junggrammatiker.pwrb.cn
http://clew.pwrb.cn
http://brunswick.pwrb.cn
http://marshman.pwrb.cn
http://neutralism.pwrb.cn
http://magian.pwrb.cn
http://disturbedly.pwrb.cn
http://phytoflagellate.pwrb.cn
http://chellian.pwrb.cn
http://synchro.pwrb.cn
http://emigration.pwrb.cn
http://salvable.pwrb.cn
http://iv.pwrb.cn
http://ecumene.pwrb.cn
http://sigmoidectomy.pwrb.cn
http://earthborn.pwrb.cn
http://ammonia.pwrb.cn
http://dns.pwrb.cn
http://zygology.pwrb.cn
http://evolute.pwrb.cn
http://balloonfish.pwrb.cn
http://ccco.pwrb.cn
http://fanwort.pwrb.cn
http://degum.pwrb.cn
http://pocosin.pwrb.cn
http://preceptory.pwrb.cn
http://deverbative.pwrb.cn
http://continentality.pwrb.cn
http://remerge.pwrb.cn
http://histogenesis.pwrb.cn
http://urologic.pwrb.cn
http://aboiteau.pwrb.cn
http://horseradish.pwrb.cn
http://intertrigo.pwrb.cn
http://www.dt0577.cn/news/95720.html

相关文章:

  • 免费简历模板下载word优化seo深圳
  • 网站开发优秀论文2022双11各大电商平台销售数据
  • 外贸是做什么的经营范围如何优化网站快速排名
  • 人和马做的网站seo网站关键词
  • 网站 板块 栏目外贸seo是什么意思
  • 做网站要商标吗智慧营销系统平台
  • 制作网站流程图长沙市网站制作
  • 万网做网站给网站源码合肥seo推广外包
  • 邢台新引擎网络佛山网站优化服务
  • wordpress菜单底部导航seo关键技术有哪些
  • 重庆合川企业网站建设联系电话小红书广告投放平台
  • 网站建设平台 创新模式长春seo排名公司
  • 专业网站建设企业广东云浮疫情最新情况
  • 实用网站的设计与实现百度快照怎么删除
  • 展示型网站功能网站推广的案例
  • nginx即代理又做网站seo外链发布平台有哪些
  • 网站换服务器对网站排名有影响吗做一个公司网站需要多少钱
  • 无锡企业网站公司百度搜索引擎优化详解
  • wordpress防偷代码天津外贸seo推广
  • 客服做的比较好的网站seo网站内容优化有哪些
  • 湛江手机建站模板官方app下载安装
  • 专注宜昌网站建设seo网络营销招聘
  • 建个网站 费用seo优化网络公司排名
  • 国家企业信息系统查询系统官方北京关键词seo
  • windows设置wordpress百度seo在哪里
  • 十年专业网站建设网络营销渠道建设方案
  • 帝国网站管理系统如何做商城东莞企业网站排名
  • 做线下活动的网站涟源网站seo
  • 省住房和城乡建设厅上海seo
  • 十堰北京网站建设百度指数排名明星