rwinch / spring-ldap

Apache License 2.0
0 stars 0 forks source link

LDAP-317: ldap:context-source/url not parsing properties #{} #82

Closed rwinch closed 8 years ago

rwinch commented 9 years ago

Original Reporter: pejas Environment: Not Specified Version: 2.0.2 Migrated From: https://jira.spring.io//browse/LDAP-317 I have tried to create ldap-context in xml, and set attributes from a properties file. {code:xml|title:applicationContextTest.xml}

<ldap:context-source url="#{ldapProperties.url}" base="#{ldapProperties.base}" username="#{ldapProperties.username}" password="#{ldapProperties.password}" />

{code} {code:title=ldap.properties} url=ldap://localhost:10389 base=ou=system username=uid=admin,ou=system password=secret {code} When I try to use ldapTemplate instance, exception is thrown: {quote} java.net.MalformedURLException: Invalid URI: #ldapProperties.url}/ou=system {quote} curly bracket removed after # jira had a problem with that.

I am attaching maven project with a test case.

There is a few ways to workaround this issue I went with java bean configuration, @Configuration, @Bean.

It might be related to a fact that we can set many urls for failover - coma separated.

rwinch commented 9 years ago

rwinch said: Thanks for the detailed report This is now fixed in master