@ConditionalOnWebApplication(type=REACTIVE) @Component public class ControllerDefaultErrorAttributes extends Object implements org.springframework.boot.web.reactive.error.ErrorAttributes
DefaultErrorAttributesDefaultErrorAttributes,
ErrorWebFluxAutoConfiguration| Modifier and Type | Field and Description |
|---|---|
protected MonitorControllerProperties |
properties |
| Constructor and Description |
|---|
ControllerDefaultErrorAttributes() |
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.http.HttpStatus |
determineHttpStatus(Throwable error)
确定HTTP返回状态:
HttpStatus
异常 class 继承:
ResponseStatusException
异常 class 增加注解:
ResponseStatus
|
Throwable |
getError(org.springframework.web.reactive.function.server.ServerRequest request) |
Map<String,Object> |
getErrorAttributes(org.springframework.web.reactive.function.server.ServerRequest request,
boolean includeStackTrace) |
void |
storeErrorInformation(Throwable error,
org.springframework.web.server.ServerWebExchange exchange) |
@Autowired protected MonitorControllerProperties properties
public Map<String,Object> getErrorAttributes(org.springframework.web.reactive.function.server.ServerRequest request, boolean includeStackTrace)
getErrorAttributes in interface org.springframework.boot.web.reactive.error.ErrorAttributespublic Throwable getError(org.springframework.web.reactive.function.server.ServerRequest request)
getError in interface org.springframework.boot.web.reactive.error.ErrorAttributespublic void storeErrorInformation(Throwable error, org.springframework.web.server.ServerWebExchange exchange)
storeErrorInformation in interface org.springframework.boot.web.reactive.error.ErrorAttributespublic static org.springframework.http.HttpStatus determineHttpStatus(Throwable error)
HttpStatus
ResponseStatusException
ResponseStatus
error - 异常信息Copyright © 2018–2019. All rights reserved.