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

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

Introduction

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

Prototype

public boolean isGlobal() 

Source Link

Document

Return if this error page is a global one (matches all unmatched status and exception types).

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 . j  a v a2 s .c om*/
            this.exceptions.put(errorPage.getException(), errorPage.getPath());
        }
    }
}