status:
Send an access request through the browser:
localhost:9000/files/download
Enter user and password
If the password is not set, the console will have
Using generated security password: 75a2959a-522c-4335-830d-d247e7b4743b
Will visit normally
Solution
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
//忽略权限授权接口,填写路径就好
web.ignoring().antMatchers("/sysUsers/*", "/auth/*", "/files/*");
}
// @Override
// public void configure(HttpSecurity http) throws Exception {
//// 任意请求允许无授权访问
// http.authorizeRequests()
// .anyRequest().permitAll();
//// http.csrf().disable().exceptionHandling().authenticationEntryPoint(getAccessDeniedHandler());
// }
}