Skip to content

Instantly share code, notes, and snippets.

@artem-smotrakov
Last active October 10, 2018 13:59
Show Gist options
  • Save artem-smotrakov/f2e7951e530806baf186fbb0e28c0948 to your computer and use it in GitHub Desktop.
Save artem-smotrakov/f2e7951e530806baf186fbb0e28c0948 to your computer and use it in GitHub Desktop.
Disable creating a default user with random password in Spring, see more in https://blog.gypsyengineer.com/en/security/tips-configuring-security-rest-api-spring.html
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
// ...
@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment