没有自定义流控的返回结果时,当服务发生了限流时会返回Blocked by Sentinel (flow limiting)的提示信息,我们可以自定义限流的返回结果,返回更加友好的提示信息,示例代码如下: @ComponentpublicclassCustomBlockExceptionHandlerimplementsBlockExceptionHandler{@Overridepublicvoidhandle(HttpServletRequestrequest,HttpServletResponse...
我们先不对他进行资源处理,我们到时候直接去Sentinel Dashboard中进行配置。 5.启动服务,访问http://localhost:8080/dash ,由于没有进行配置流控规则,所以不存在限流行为 此时,我们springcloud集成sentinel的配置完成了,我们进入Sentinel Dashboard这个来实现流控规则的处理吧! 6.访问http://localhost:7777/进入Sentinel D...