Spring security filterinvocation failed to get access path

Alibaba cloud Q & A 2022-02-13 07:21:50 阅读数:686

spring security filterinvocation failed access
 @Override protected void configure (HttpSecurity http) throws Exception { http.cors() .and() .headers().frameOptions().disable() .and() .authorizeRequests() .anyRequest().authenticated() .withObjectPostProcessor(new ObjectPostProcessor<FilterSecurityInterceptor>() { @Override public <O extends FilterSecurityInterceptor> O postProcess (O o) { o.setSecurityMetadataSource(urlFilterInvocationSecurityMetadataSource); o.setAccessDecisionManager(urlAccessDecisionManager); return o; } }) .and() .addFilterAfter(loginAuthenticationFilter, UsernamePasswordAuthenticationFilter.class) .addFilterBefore(mobileAuthenticationProcessingFilter, AbstractPreAuthenticatedProcessingFilter.class) .csrf().disable() .formLogin() .permitAll() .and() .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .exceptionHandling() .authenticationEntryPoint(loginAuthenticationEntryPoint) .accessDeniedHandler(urlAccessDeniedHandler); }

copyright:author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130721492983.html