Example usage for org.springframework.security.config.annotation.authentication.configurers.provisioning JdbcUserDetailsManagerConfigurer JdbcUserDetailsManagerConfigurer

List of usage examples for org.springframework.security.config.annotation.authentication.configurers.provisioning JdbcUserDetailsManagerConfigurer JdbcUserDetailsManagerConfigurer

Introduction

In this page you can find the example usage for org.springframework.security.config.annotation.authentication.configurers.provisioning JdbcUserDetailsManagerConfigurer JdbcUserDetailsManagerConfigurer.

Prototype

public JdbcUserDetailsManagerConfigurer() 

Source Link

Usage

From source file:org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder.java

/**
 * Add JDBC authentication to the {@link AuthenticationManagerBuilder} and return a
 * {@link JdbcUserDetailsManagerConfigurer} to allow customization of the JDBC
 * authentication.//ww  w  .j a v  a 2s  .  c  o  m
 *
 * <p>
 * When using with a persistent data store, it is best to add users external of
 * configuration using something like <a href="https://flywaydb.org/">Flyway</a> or <a
 * href="https://www.liquibase.org/">Liquibase</a> to create the schema and adding
 * users to ensure these steps are only done once and that the optimal SQL is used.
 * </p>
 *
 * <p>
 * This method also ensure that a {@link UserDetailsService} is available for the
 * {@link #getDefaultUserDetailsService()} method. Note that additional
 * {@link UserDetailsService}'s may override this {@link UserDetailsService} as the
 * default. See the <a href=
 * "https://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#user-schema"
 * >User Schema</a> section of the reference for the default schema.
 * </p>
 *
 * @return a {@link JdbcUserDetailsManagerConfigurer} to allow customization of the
 * JDBC authentication
 * @throws Exception if an error occurs when adding the JDBC authentication
 */
public JdbcUserDetailsManagerConfigurer<AuthenticationManagerBuilder> jdbcAuthentication() throws Exception {
    return apply(new JdbcUserDetailsManagerConfigurer<>());
}