All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.luues.security.configuration.errorPage.ErrorPageConfiguration Maven / Gradle / Ivy

package com.luues.security.configuration.errorPage;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.web.server.ErrorPage;
import org.springframework.boot.web.server.ErrorPageRegistrar;
import org.springframework.boot.web.server.ErrorPageRegistry;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;

//@Configuration("security_errorPageConfiguration")
@Slf4j(topic = "c.l.s.c.e.ErrorPageConfiguration")
public class ErrorPageConfiguration implements ErrorPageRegistrar {
    @Override
    public void registerErrorPages(ErrorPageRegistry registry) {
        ErrorPage error401Page = new ErrorPage(HttpStatus.UNAUTHORIZED, "/securityjars/401.html");
        ErrorPage error403Page = new ErrorPage(HttpStatus.FORBIDDEN, "/securityjars/403.html");
        registry.addErrorPages(error401Page, error403Page);
        log.info("error page is : {}:{}", "/securityjars/", "401|403");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy