|
|
|
|
|
|
|
|
SecurityFilterChain defaultSecurityFilterChain(HttpSecurity http) throws Exception { |
|
|
SecurityFilterChain defaultSecurityFilterChain(HttpSecurity http) throws Exception { |
|
|
//http.addFilterBefore(verifyCodeFilter, UsernamePasswordAuthenticationFilter.class); |
|
|
//http.addFilterBefore(verifyCodeFilter, UsernamePasswordAuthenticationFilter.class); |
|
|
http.addFilterAt(new VerifyCodeFilter(),UsernamePasswordAuthenticationFilter.class); |
|
|
http.addFilterAt(new VerifyCodeFilter(),UsernamePasswordAuthenticationFilter.class); |
|
|
http.sessionManagement().disable(); |
|
|
|
|
|
http.csrf().disable() |
|
|
http.csrf().disable() |
|
|
.authorizeHttpRequests((authorize) -> authorize |
|
|
.authorizeHttpRequests((authorize) -> authorize |
|
|
.antMatchers("/toLogin", "/getHealth", "/static/**", "/vercode").permitAll() |
|
|
.antMatchers("/toLogin", "/getHealth", "/static/**", "/vercode").permitAll() |