Frage

In , how embedded can be used with Template. Currently, my configuration is -

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:security="http://www.springframework.org/schema/security" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
      http://www.springframework.org/schema/security 
      http://www.springframework.org/schema/security/spring-security-3.0.xsd">
    <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
        <property name="url" value="${PROVIDER_URL}" />
        <property name="base" value="${Search_Base}" />
        <property name="userDn" value="${SECURITY_PRINCIPAL}" />
        <property name="password" value="${SECURITY_CREDENTIALS}" />
    </bean>
    <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
        <constructor-arg ref="contextSource" />
    </bean>
</beans>

ContextSource values are available in properties file. Now I want to use embedded ldap -

<security:ldap-server ldif="classpath:sample.ldif"  root="cn=mojo"/>

What would be default port that I will specify in LdapContextSource values.

War es hilfreich?

Lösung

The port of the embedded ldap server defaults to 33389, see the related source code.

Andere Tipps

You can choose a port using the port attribute of the ldap-server element. See the namespace appendix in the reference manual. This also gives the default value.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top