开发者社区 > 云原生 > 正文

JsonConverter解析json时抛出异常 Method threw 'com.fasterx

https://github.com/spring-cloud-incubator/spring-cloud-alibaba/blob/e0c9ba39654ceecd6607edf78884458c4c15ba04/spring-cloud-alibaba-sentinel-datasource/src/main/java/org/springframework/cloud/alibaba/sentinel/datasource/converter/JsonConverter.java#L115

版本:spring-cloud-starter-alibaba-sentinel 0.1.1.RELEASE 抛出了Method threw 'com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException' exception.异常

https://github.com/spring-cloud-incubator/spring-cloud-alibaba/blob/e0c9ba39654ceecd6607edf78884458c4c15ba04/spring-cloud-alibaba-sentinel/src/main/java/org/springframework/cloud/alibaba/sentinel/custom/SentinelAutoConfiguration.java#L163

是否应该忽略不存在的字段?

原提问者GitHub用户yklove

展开
收起
白夜行fighting 2023-06-11 10:50:48 417 0
1 条回答
写回答
取消 提交回答
  • 自动解析有点问题,比如 黑白名单规则 AuthorityRule 所有的属性是 限流规则 FlowRule 的子集,这样自动解析就会有点问题。

    下个版本会添加一个 rule-type 属性让用户决定使用哪种规则。 目前在 master 分支上已经实现。

    There is some problems in automation of sentinel rule parser.

    For example, all attributes in AuthorityRule include in FlowRule.

    We will add a new attribute rule-type to choose which rule to convert and it has been finished on the master branch now.

    原回答者GitHub用户fangjian0423

    2023-06-11 11:37:34
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
神龙云服务器产品及技术深度解析 立即下载
弹性创造价值:基于ECS的最佳性价比实践解析 立即下载
又快又稳:阿里云下一代虚拟交换机解析 立即下载

相关镜像