Spring security 设置ContextSource的基本环境属性

Spring security 设置ContextSource的基本环境属性,spring-security,spring-ldap,Spring Security,Spring Ldap,我需要通过设置(如使用自定义套接字工厂禁用SSL检查)。我的选择是使用吗 @Configuration protected static class AuthenticationConfig extends GlobalAuthenticationConfigurerAdapter { public void init(AuthenticationManagerBuilder auth) throws Exception { // @formatter:off

我需要通过设置(如使用自定义套接字工厂禁用SSL检查)。我的选择是使用吗

@Configuration
protected static class AuthenticationConfig extends GlobalAuthenticationConfigurerAdapter {

    public void init(AuthenticationManagerBuilder auth) throws Exception {
        // @formatter:off
        auth.ldapAuthentication().contextSource()
            .url("ldaps://xxx:636")
            .managerDn("uid=emt,ou=funcids,ou=applications,o=xxx,c=us")
            .managerPassword("XA1zWgAU")
            .and()
            .userSearchBase("o=xxx,c=us")
            .userSearchFilter("(&(uid={0})(objectclass=person))")
            .groupSearchBase("ou=internal,o=xxx,c=us")
            .groupSearchFilter("(&(uid={0})(objectclass=person)(ismemberof=*))");
        // @formatter:on
    }
}