List of usage examples for org.springframework.security.web.access ExceptionTranslationFilter ExceptionTranslationFilter
public ExceptionTranslationFilter(AuthenticationEntryPoint authenticationEntryPoint,
RequestCache requestCache)
From source file:org.lightadmin.core.config.context.LightAdminSecurityConfiguration.java
@Bean public Filter exceptionTranslationFilter(RequestCache requestCache) { AccessDeniedHandlerImpl accessDeniedHandler = new AccessDeniedHandlerImpl(); accessDeniedHandler.setErrorPage(applicationUrl("/access-denied")); LoginUrlAuthenticationEntryPoint authenticationEntryPoint = new LoginUrlAuthenticationEntryPoint( applicationUrl("/login")); ExceptionTranslationFilter exceptionTranslationFilter = new ExceptionTranslationFilter( authenticationEntryPoint, requestCache); exceptionTranslationFilter.setAccessDeniedHandler(accessDeniedHandler); return exceptionTranslationFilter; }