I added one custom Security Config in my application on Spring Boot, but the message about "Using default security password" is still there in LOG file.
Is there any to remove it? I do not need this default password. It seems Spring Boot is not recognizing my security policy.
@Configuration
@EnableWebSecurity
public class CustomSecurityConfig extends WebSecurityConfigurerAdapter {
private final String uri = "/custom/*";
@Override
public void configure(final HttpSecurity http) throws Exception {
http.csrf().disable();
http.headers().httpStrictTransportSecurity().disable();
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
// Authorize sub-folders permissions
http.antMatcher(uri).authorizeRequests().anyRequest().permitAll();
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…