/** * Construct the controller with the current server error properties. * * @param errorProperties Api error properties. * @since 1.0.0 */ @Autowired public RestfulErrorController(@NotNull ErrorProperties errorProperties, @NotNull List<ErrorHandler> errorHandlers) { Assert.notNull(errorProperties, "ErrorProperties must not be null"); Assert.notNull(errorHandlers, "ErrorHandlers must not be null"); this.errorProperties = errorProperties; this.errorHandlers = errorHandlers; }
/** * Determine if the stacktrace attribute should be included. * * @param request the source request * @param produces the media type produced (or {@code MediaType.ALL}) * @return if the stacktrace attribute should be included */ protected boolean isIncludeStackTrace(HttpServletRequest request, MediaType produces) { ErrorProperties.IncludeStacktrace include = this.serverProperties.getError().getIncludeStacktrace(); if (include == ErrorProperties.IncludeStacktrace.ALWAYS) { return true; } if (include == ErrorProperties.IncludeStacktrace.ON_TRACE_PARAM) { return getTraceParameter(request); } return false; }
/** * Determine if the stacktrace attribute should be included. * * @param request * the source request * @param produces * the media type produced (or {@code MediaType.ALL}) * @return if the stacktrace attribute should be included */ protected boolean isIncludeStackTrace(HttpServletRequest request, MediaType produces) { ErrorProperties.IncludeStacktrace include = this.serverProperties.getError().getIncludeStacktrace(); if (include == ErrorProperties.IncludeStacktrace.ALWAYS) { return true; } if (include == ErrorProperties.IncludeStacktrace.ON_TRACE_PARAM) { return getTraceParameter(request); } return false; }
/** * Determine if the stacktrace attribute should be included. * @param request the source request * @param produces the media type produced (or {@code MediaType.ALL}) * @return if the stacktrace attribute should be included */ protected boolean isIncludeStackTrace(HttpServletRequest request, MediaType produces) { ErrorProperties.IncludeStacktrace include = this.serverProperties.getError().getIncludeStacktrace(); if (include == ErrorProperties.IncludeStacktrace.ALWAYS) { return true; } if (include == ErrorProperties.IncludeStacktrace.ON_TRACE_PARAM) { return getTraceParameter(request); } return false; }
public CrnkErrorController(ErrorAttributes errorAttributes, ErrorProperties errorProperties) { super(errorAttributes, errorProperties); }
public CrnkErrorController(ErrorAttributes errorAttributes, ErrorProperties errorProperties, List<ErrorViewResolver> errorViewResolvers) { super(errorAttributes, errorProperties, errorViewResolvers); }
public CustomErrorController(ErrorAttributes errorAttributes, ErrorProperties errorProperties) { super(errorAttributes, errorProperties); }
public CustomErrorController(ErrorAttributes errorAttributes, ErrorProperties errorProperties, List<ErrorViewResolver> errorViewResolvers) { super(errorAttributes, errorProperties, errorViewResolvers); }
public DataResultErrorController(ErrorAttributes errorAttributes, ErrorProperties errorProperties) { super(errorAttributes, errorProperties); }
public DataResultErrorController(ErrorAttributes errorAttributes, ErrorProperties errorProperties, List<ErrorViewResolver> errorViewResolvers) { super(errorAttributes, errorProperties, errorViewResolvers); }
public CommonErrorController(final ErrorAttributes errorAttributes, ErrorProperties errorProperties) { super(errorAttributes); this.errorProperties = errorProperties; }
public CustomErrorController(final ErrorAttributes errorAttributes, final ErrorProperties errorProperties) { super(errorAttributes, errorProperties); }
@Bean public ErrorProperties errorProperties() { final ErrorProperties properties = new ErrorProperties(); properties.setIncludeStacktrace(IncludeStacktrace.ALWAYS); return properties; }
public MyErrorController(ErrorAttributes errorAttributes) { super(errorAttributes, new ErrorProperties()); }
@Autowired public ErrorController(ErrorAttributes errorAttributes) { super(errorAttributes, new ErrorProperties()); }
/** * Construct a {@link ErrorProperties} with the current server properties. * * @param serverProperties Current server properties. * @return A singleton {@link ErrorProperties} bean. * @since 1.0.0 */ @Bean public ErrorProperties errorProperties(ServerProperties serverProperties) { return serverProperties.getError(); }