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}
{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.
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.