config/src/main/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurer.java
public ExceptionHandlingConfigurer<H> accessDeniedPage(String accessDeniedUrl) {
		AccessDeniedHandlerImpl accessDeniedHandler = new AccessDeniedHandlerImpl();
		accessDeniedHandler.setErrorPage(accessDeniedUrl);
		return accessDeniedHandler(accessDeniedHandler);
	}
public ExceptionHandlingConfigurer<H> accessDeniedPage(String accessDeniedUrl) {
		AccessDeniedHandlerImpl accessDeniedHandler = new AccessDeniedHandlerImpl();
		accessDeniedHandler.setErrorPage(accessDeniedUrl);
		return accessDeniedHandler(accessDeniedHandler);
	}
Shortcut to specify the {@link AccessDeniedHandler} to be used is a specific error
page

@param accessDeniedUrl the URL to the access denied page (i.e. /errors/401)
@return the {@link ExceptionHandlingConfigurer} for further customization
@see AccessDeniedHandlerImpl
@see #accessDeniedHandler(org.springframework.security.web.access.AccessDeniedHandler)