fix
Helius
2022-06-24 0d3b5d12813869553769fd544ef57465c0d1cb45
src/main/java/com/xcong/farmer/cms/configurations/security/WebSecurityConfig.java
@@ -32,6 +32,7 @@
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        System.out.println(4444414);
        http.httpBasic().and().
                cors().and().csrf().disable()
                .exceptionHandling().authenticationEntryPoint(authenticationEntryPoint())
@@ -39,10 +40,16 @@
                .authorizeRequests()
                .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
                .antMatchers("/login").permitAll()
                .antMatchers("/html").permitAll()
                .antMatchers("/swagger**/**").permitAll()
                .antMatchers("/webjars/**").permitAll()
                .antMatchers("/v2/**").permitAll()
                .antMatchers("/api/common/login").permitAll()
                .antMatchers("/api/common/captcha").permitAll()
                .antMatchers("/api/common/doUpload").permitAll()
                .antMatchers("/api/common/uploadFile").permitAll()
                .antMatchers("/api/messageBoard/addMessage").permitAll()
                .antMatchers("/image/**").permitAll()
                .anyRequest().authenticated()
                .and().apply(securityConfiguereAdapter());
    }
@@ -68,6 +75,7 @@
    }
    public TokenConfigurer securityConfiguereAdapter() {
        System.out.println(33333333);
        return new TokenConfigurer();
    }
}