I currently working with LDAP using Spring Security with XML Configuration. I need advice about how can i put attributes like URL, port, manager-dn and password in external file.
<ldap-server id="ldapServer"
url="ldap://xxxxx:3268/dc=xxxxx,dc=com" port="3268"
manager-dn="xxxxx@xxxxx.com" manager-password="xxxxxx" />
i mean, we need to put it externally because our other team (implementation team) need to change those properties values to go live without changing anything in war/binary file. Thank you
Done, thanks to this post
Steps :
####### LDAP ##############
ldap.urls= ldap://xxxx:3268/dc=xxxxx,dc=com
ldap.manager-dn= xxxx@xxxxx.com
ldap.manager-password= xxxx
<beans:bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<beans:property name="location">
<beans:value>file:///opt/xxxx/xxxxx/application.properties</beans:value>
</beans:property>
</beans:bean>
<ldap-server id="ldapServer" url="${ldap.urls}" port="3268"
manager-dn="${ldap.manager-dn}"
manager-password="${ldap.manager-password}" />