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

Spring Cloud网关+sentinel ParamFlowException:$D

异常如下

com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowException: $D Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has been observed at the following site(s): |_ checkpoint ⇢ springfox.boot.starter.autoconfigure.SwaggerUiWebFluxConfiguration$CustomWebFilter [DefaultWebFilterChain] |_ checkpoint ⇢ com.shanjiancaofu.gateway.config.RouterFunctionConfiguration$$Lambda$666/290991542 [DefaultWebFilterChain] |_ checkpoint ⇢ com.shanjiancaofu.gateway.filter.PreRequestFilter [DefaultWebFilterChain] |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain] |_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain] |_ checkpoint ⇢ HTTP GET "/ad-user/sysUser/page?pageNo=1&pageSize=10" [ExceptionHandlingWebHandler] Stack trace:

当我使用版本如下

    <dependency>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
        <version>2.2.3.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>

2.2.5.RELEASE com.alibaba.csp sentinel-transport-simple-http 1.8.0 com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery 2.2.3.RELEASE com.alibaba.cloud spring-cloud-starter-alibaba-nacos-config

window 10 java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

原提问者GitHub用户jeesk

展开
收起
学习娃 2023-05-19 15:21:14 306 0
1 条回答
写回答
取消 提交回答
  • 这是Sentinel的BlockException,表明它已被Sentinel网关规则阻止。您可以配置web错误处理程序来处理它。

    原回答者GitHub用户sczyh30

    2023-05-19 20:21:49
    赞同 展开评论 打赏

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

相关电子书

更多
阿里云容器 AHAS Sentinel 网关流控揭秘 立即下载
阿里Tengine网关最佳实践 立即下载
《MSE 微服务网关》 立即下载