Search code examples
javaspringspring-bootspring-ldapspring-config

Spring Boot LDAP - pooled property for auto configuration


In Spring Boot I can pass properties which will be picked for auto configuration:

  • spring.ldap.url
  • spring.ldap.username
  • spring.ldap.password

Is there any spring.ldap.* property to set pooled=true to avoid using explicit LdapTemplate config?

LdapContextSource contextSource = new LdapContextSource();
contextSource.setPooled(true);

Solution

  • According to the Appendix that lists all of the Spring Boot properties, no. I also looked at the LdapProperties class which stores these values at runtime and didn't see anything in there that would help with pooling. I suspect you'll have to keep doing this manually.

    Perhaps file a PR on them? They seem open to adding things if there is a need in the community.