Example usage for org.springframework.boot.web.server ErrorPage getStatus

List of usage examples for org.springframework.boot.web.server ErrorPage getStatus

Introduction

In this page you can find the example usage for org.springframework.boot.web.server ErrorPage getStatus.

Prototype

public HttpStatus getStatus() 

Source Link

Document

The HTTP status value that this error page matches (or null for a page that matches by exception).

Usage

From source file:org.springframework.boot.web.servlet.support.ErrorPageFilter.java

@Override
public void addErrorPages(ErrorPage... errorPages) {
    for (ErrorPage errorPage : errorPages) {
        if (errorPage.isGlobal()) {
            this.global = errorPage.getPath();
        } else if (errorPage.getStatus() != null) {
            this.statuses.put(errorPage.getStatus().value(), errorPage.getPath());
        } else {/*from w w  w . ja va2 s  .c o  m*/
            this.exceptions.put(errorPage.getException(), errorPage.getPath());
        }
    }
}