Skip to content

Conversation

vpavic
Copy link
Contributor

@vpavic vpavic commented May 10, 2018

Auto-configuration of LDAP's LdapTemplate is currently a part of LdapDataAutoConfiguration which is conditional of presence of LdapRepository (i.e. Spring Data LDAP). This arrangement isn't ideal (and doesn't make much sense) since the LdapTemplate is a part of Spring LDAP project, and therefore should not be tied to Spring Data LDAP.

This PR improves and simplifies LDAP auto-configuration by moving LdapTemplate configuration to LdapAutoConfiguration. Consequently, LdapDataAutoConfiguration is not needed anymore and is removed.

Auto-configuration of LDAP's `LdapTemplate` is currently a part of `LdapDataAutoConfiguration` which is conditional of presence of `LdapRepository` (i.e. Spring Data LDAP). This arrangement isn't ideal since the `LdapTemplate` is a part of Spring LDAP project, and therefore should not be tied to Spring Data LDAP.

This commit improves and simplifies LDAP auto-configuration by moving `LdapTemplate` configuration to `LdapAutoConfiguration`. Consequently, `LdapDataAutoConfiguration` is not needed anymore and is removed.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 10, 2018
@snicoll snicoll added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels May 11, 2018
@snicoll snicoll added this to the Backlog milestone May 11, 2018
@snicoll snicoll self-assigned this May 11, 2018
@snicoll snicoll modified the milestones: Backlog, 2.1.0.M1 May 11, 2018
snicoll pushed a commit that referenced this pull request May 11, 2018
Auto-configuration of LDAP's `LdapTemplate` is currently a part of
`LdapDataAutoConfiguration` which is conditional of presence of
`LdapRepository` (i.e. Spring Data LDAP). This arrangement isn't ideal
since the `LdapTemplate` is a part of Spring LDAP project, and therefore
should not be tied to Spring Data LDAP.

This commit improves and simplifies LDAP auto-configuration by moving
`LdapTemplate` configuration to `LdapAutoConfiguration`. Consequently,
`LdapDataAutoConfiguration` is not needed anymore and is removed.

See gh-13136
@snicoll snicoll closed this in a0a0bea May 11, 2018
snicoll added a commit that referenced this pull request May 11, 2018
* pr/13136:
  Polish "Improve LDAP auto-configuration"
  Improve LDAP auto-configuration
@snicoll
Copy link
Member

snicoll commented May 11, 2018

Nice one, thanks @vpavic!

@vpavic vpavic deleted the improve-ldap-autoconfig branch May 11, 2018 12:45
filiphr added a commit to flowable/flowable-engine that referenced this pull request Aug 14, 2019
…m tests

Before 2.1.0 the LdapHealthIndicator was not created due to the missing LdapOperations.
However since 2.1 the LdapOperations bean creation was moved into the LdapAutoConfiguration (see spring-projects/spring-boot#13136)
which lead to the LdapHealthIndicator being created and thus the FlowableIdmApplicationSecurityTest was failing due to the ldap user and password being null.
See  spring-projects/spring-boot#17861 for the problem in Spring Boot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants