类org.springframework.boot.web.servlet.error.ErrorAttributes源码实例Demo

下面列出了怎么用org.springframework.boot.web.servlet.error.ErrorAttributes的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: beihu-boot   文件: DefaultErrorController.java
public DefaultErrorController(ErrorAttributes errorAttributes, ServerProperties properties) {
    super(errorAttributes == null ? new DefaultErrorAttributes() : errorAttributes);
    if (properties == null) {
        errorProperties = new ErrorProperties();
        errorProperties.setPath("/error");
    } else {
        this.errorProperties = properties.getError();
    }
}
 
/**
 * Registers a custom {@link ErrorController} to change the default error handling approach.
 *
 * @param errorAttributes    Will be used to enrich error responses.
 * @param serverProperties   Will be used to access error related configurations.
 * @param errorViewResolvers All possible view resolvers to render the whitelabel error page.
 * @return The custom error controller instance.
 */
@Bean
@ConditionalOnBean(WebErrorHandlers.class)
@ConditionalOnMissingBean(ErrorController.class)
public BasicErrorController customErrorController(ErrorAttributes errorAttributes,
                                             ServerProperties serverProperties,
                                             ObjectProvider<ErrorViewResolver> errorViewResolvers) {
    List<ErrorViewResolver> resolvers = errorViewResolvers.orderedStream().collect(toList());
    return new CustomServletErrorController(errorAttributes, serverProperties.getError(), resolvers);
}
 
源代码3 项目: halo   文件: CommonController.java
public CommonController(ThemeService themeService,
                        ErrorAttributes errorAttributes,
                        ServerProperties serverProperties,
                        OptionService optionService) {
    super(errorAttributes);
    this.themeService = themeService;
    this.errorProperties = serverProperties.getError();
    this.optionService = optionService;
}
 
源代码4 项目: My-Blog   文件: ErrorPageController.java
public ErrorPageController(ErrorAttributes errorAttributes) {
    this.errorAttributes = errorAttributes;
}
 
源代码5 项目: authmore-framework   文件: ErrorEndpoint.java
public ErrorEndpoint(ErrorAttributes errorAttributes) {
    super(errorAttributes);
}
 
源代码6 项目: springdoc-openapi   文件: ExceptionTranslator.java
public ExceptionTranslator(ErrorAttributes errorAttributes) {
	this.errorAttributes = errorAttributes;
}
 
源代码7 项目: springdoc-openapi   文件: ExceptionTranslator.java
public ExceptionTranslator(ErrorAttributes errorAttributes) {
	this.errorAttributes = errorAttributes;
}
 
源代码8 项目: springdoc-openapi   文件: ExceptionTranslator.java
public ExceptionTranslator(ErrorAttributes errorAttributes) {
	this.errorAttributes = errorAttributes;
}
 
源代码9 项目: My-Blog-layui   文件: ErrorPageController.java
public ErrorPageController(ErrorAttributes errorAttributes) {
    this.errorAttributes = errorAttributes;
}
 
源代码10 项目: newbee-mall   文件: ErrorPageController.java
public ErrorPageController(ErrorAttributes errorAttributes) {
    this.errorAttributes = errorAttributes;
}
 
源代码11 项目: springboot-learn   文件: ErrorPagesController.java
/**
 * 初始化ExceptionController
 *
 * @param errorAttributes
 */
@Autowired
public ErrorPagesController(ErrorAttributes errorAttributes) {
    Assert.notNull(errorAttributes, "ErrorAttributes must not be null");
    this.errorAttributes = errorAttributes;
}
 
源代码12 项目: syhthems-platform   文件: CustomErrorController.java
@Autowired
public CustomErrorController(ErrorAttributes errorAttributes, ServerProperties serverProperties) {
    super(errorAttributes);
    this.errorProperties = serverProperties.getError();
}
 
源代码13 项目: spring-cloud-yes   文件: MyErrorController.java
@Autowired
public MyErrorController(ErrorAttributes errorAttributes, ServerProperties serverProperties) {
    super(errorAttributes, serverProperties.getError());
}
 
源代码14 项目: nimrod   文件: CustomBasicErrorController.java
public CustomBasicErrorController(ErrorAttributes errorAttributes) {
    super(errorAttributes);
}
 
源代码15 项目: springboot-shiro   文件: ErrorPagesController.java
/**
 * 初始化ExceptionController
 *
 * @param errorAttributes
 */
@Autowired
public ErrorPagesController(ErrorAttributes errorAttributes) {
    Assert.notNull(errorAttributes, "ErrorAttributes must not be null");
    this.errorAttributes = errorAttributes;
}
 
public CustomServletErrorController(ErrorAttributes errorAttributes,
                                    ErrorProperties errorProperties,
                                    List<ErrorViewResolver> resolvers) {
    super(errorAttributes, errorProperties, resolvers);
}
 
源代码17 项目: BlogManagePlatform   文件: FinalController.java
@Autowired
public FinalController(ErrorAttributes errorAttributes, ServerProperties serverProperties) {
	super(errorAttributes);
	this.errorProperties = serverProperties.getError();
}
 
源代码18 项目: openapi-petstore   文件: ExceptionTranslator.java
public ExceptionTranslator(ErrorAttributes errorAttributes) {
    this.errorAttributes = errorAttributes;
}
 
源代码19 项目: blade-tool   文件: BladeErrorController.java
public BladeErrorController(ErrorAttributes errorAttributes, ErrorProperties errorProperties) {
	super(errorAttributes, errorProperties);
}
 
@Bean
@ConditionalOnMissingBean(value = ErrorAttributes.class, search = SearchStrategy.CURRENT)
public DefaultErrorAttributes errorAttributes() {
	return new BladeErrorAttributes();
}
 
@Bean
@ConditionalOnMissingBean(value = ErrorController.class, search = SearchStrategy.CURRENT)
public BasicErrorController basicErrorController(ErrorAttributes errorAttributes) {
	return new BladeErrorController(errorAttributes, serverProperties.getError());
}
 
public ErrorPageController(ErrorAttributes errorAttributes, List<ErrorViewResolver> errorViewResolvers) {
    super(errorAttributes, errorViewResolvers);
}
 
源代码23 项目: OneBlog   文件: ErrorPagesController.java
/**
 * 初始化ExceptionController
 *
 * @param errorAttributes
 */
@Autowired
public ErrorPagesController(ErrorAttributes errorAttributes) {
    Assert.notNull(errorAttributes, "ErrorAttributes must not be null");
    this.errorAttributes = errorAttributes;
}
 
@Bean
public ErrorAttributes errorAttributes() {
	// override boot's DefaultErrorAttributes
	return new SkipperErrorAttributes();
}
 
源代码25 项目: spring-cloud-skipper   文件: ServerDependencies.java
@Bean
public ErrorAttributes errorAttributes() {
	// override boot's DefaultErrorAttributes
	return new SkipperErrorAttributes();
}
 
源代码26 项目: spring-boot-projects   文件: ErrorPageController.java
public ErrorPageController(ErrorAttributes errorAttributes) {
    this.errorAttributes = errorAttributes;
}
 
源代码27 项目: spring-boot-projects   文件: ErrorPageController.java
public ErrorPageController(ErrorAttributes errorAttributes) {
    this.errorAttributes = errorAttributes;
}
 
@Bean
@ConditionalOnMissingBean(value = ErrorController.class, search = SearchStrategy.CURRENT)
public BasicErrorController jsonapiErrorController(ErrorAttributes errorAttributes) {
	return new CrnkErrorController(errorAttributes, this.serverProperties.getError(), this.errorViewResolvers);
}
 
源代码29 项目: crnk-framework   文件: CrnkErrorController.java
public CrnkErrorController(ErrorAttributes errorAttributes,
						   ErrorProperties errorProperties) {
	super(errorAttributes, errorProperties);
}
 
源代码30 项目: crnk-framework   文件: CrnkErrorController.java
public CrnkErrorController(ErrorAttributes errorAttributes,
						   ErrorProperties errorProperties,
						   List<ErrorViewResolver> errorViewResolvers) {
	super(errorAttributes, errorProperties, errorViewResolvers);
}
 
 类所在包
 同包方法