-
Notifications
You must be signed in to change notification settings - Fork 417
Open
Description
限流、熔断统一处理类 WebfluxHandler 不生效
WebfluxHandler.java 44 line
/**
* 限流、熔断统一处理类
*/
@Configuration
@ConditionalOnClass(ServerResponse.class)
public static class WebfluxHandler {
@Bean
public BlockRequestHandler webfluxBlockExceptionHandler() {
return (exchange, t) ->
ServerResponse.status(HttpStatus.TOO_MANY_REQUESTS)
.contentType(MediaType.APPLICATION_JSON)
.body(BodyInserters.fromValue(Result.fail(t.getMessage())));
}
}Metadata
Metadata
Assignees
Labels
No labels