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

长春哪家互联网做得好seo关键词大搜

长春哪家互联网做得好,seo关键词大搜,学校网站代码,2018网站建设在使用 openfeign 进行服务之间数据传输时发现了一个问题,数据在下游正常处理,响应到调用端数据也读取到了,但是就是 jackson 转对象序列化时出了问题,异常如下 Failed to complete request: feign.codec.DecodeException: Type d…

在使用 openfeign 进行服务之间数据传输时发现了一个问题,数据在下游正常处理,响应到调用端数据也读取到了,但是就是 jackson 转对象序列化时出了问题,异常如下

Failed to complete request: feign.codec.DecodeException: Type definition error: [simple type, class com.xxx.common.core.model.PaginationInfo]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.xxx.common.core.model.PaginationInfo` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

原代码如下

import java.util.List;public class PaginationInfo {private Integer currentPages;private Integer total;private List records;private PaginationInfo(Builder builder) {setCurrentPages(builder.currentPages);setTotal(builder.total);setRecords(builder.records);}public static Builder builder() {return new Builder();}public Integer getCurrentPages() {return currentPages;}public void setCurrentPages(Integer currentPages) {this.currentPages = currentPages;}public Integer getTotal() {return total;}public void setTotal(Integer total) {this.total = total;}public List getRecords() {return records;}public void setRecords(List records) {this.records = records;}public static final class Builder {private Integer currentPages;private Integer total;private List records;private Builder() {}public Builder currentPages(Integer val) {currentPages = val;return this;}public Builder total(Integer val) {total = val;return this;}public Builder records(List val) {records = val;return this;}public PaginationInfo build() {return new PaginationInfo(this);}}
}

使用了链式编程进行赋值操作,按照上面的提示就是没有默认构造器,将private的构造器修改为public,添加一个默认构造器,效果如下

import java.util.List;public class PaginationInfo {private Integer currentPages;private Integer total;private List records;public PaginationInfo() {}public PaginationInfo(Builder builder) {setCurrentPages(builder.currentPages);setTotal(builder.total);setRecords(builder.records);}public static Builder builder() {return new Builder();}public Integer getCurrentPages() {return currentPages;}public void setCurrentPages(Integer currentPages) {this.currentPages = currentPages;}public Integer getTotal() {return total;}public void setTotal(Integer total) {this.total = total;}public List getRecords() {return records;}public void setRecords(List records) {this.records = records;}public static final class Builder {private Integer currentPages;private Integer total;private List records;private Builder() {}public Builder currentPages(Integer val) {currentPages = val;return this;}public Builder total(Integer val) {total = val;return this;}public Builder records(List val) {records = val;return this;}public PaginationInfo build() {return new PaginationInfo(this);}}
}

试了一下,运行正常。

http://www.dinnco.com/news/64282.html

相关文章:

  • 广州建筑集团下属公司有哪些数字营销服务商seo
  • 手机网站建设哪家公司好网络优化工程师主要做什么
  • 怎么自己做网站的推广培训机构好还是学校好
  • 政府网站智能问答建设方案郑州网站建设用户
  • php开发网站重庆森林电影完整版
  • 推销商务网站的途径有哪些推广方案有哪些
  • dw怎么把网站做的漂亮百度网盘客服
  • wordpress如何编辑网页加代码优化器
  • 400网站建设外贸展示型网站建设公司
  • 枣庄做网站建设的公司正规seo关键词排名哪家专业
  • 专业开发网站公司跨境电商平台哪个最好最可靠
  • 求个没封的a站yw1129cm社交网络推广方法有哪些
  • 在谷歌上做网站广告要多少钱国家免费培训学校
  • 做优惠卷网站倒闭了多少个人购买链接
  • 昆山网站制作哪家强什么软件可以推广自己的产品
  • app线上推广方式排名优化外包公司
  • 网建设门户网站营销策略ppt模板
  • 做外围网站犯法吗长春seo按天计费
  • 百度网站权重查询东莞新闻头条新闻
  • 温州网站建设首选龙诚互联百度 站长工具
  • 在线申请网络优化器下载
  • 2345浏览器手机版seo技术服务外包
  • 自己的网站怎样做优化备案查询官网
  • 网站规划内容方案深圳优化公司排名
  • 安徽平台网站建设企业武汉网络关键词排名
  • 怎么建设投票网站百度广告联盟下载
  • html5的篮球网站开发上海seo优化公司kinglink
  • 扁平化网站设计欣赏山东seo费用多少
  • 企业的网站建设策划书百度推广怎么注册账号
  • wordpress 图片懒加载南宁seo排名优化