Announcement Announcement Module
Collapse
No announcement yet.
Ldapcontextsource bean properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ldapcontextsource bean properties

    Hi,
    In the following sample configuration file the ldapcontextsource bean is being instantiated with 4 properties.
    Code:
      <beans>
    <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
    <property name="url" value="ldap://localhost:389" />
    <property name="base" value="dc=example,dc=com" />
    <property name="userDn" value="cn=Manager" />
    <property name="password" value="secret" />
    </bean>
    <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
    <constructor-arg ref="contextSource" />
    </bean>
    <bean id="personDao" class="com.example.dao.PersonDaoImpl">
    <property name="ldapTemplate" ref="ldapTemplate" />
    </bean>
    </beans>
    But in the java doc the ldapcontextsource class has only three inherited properties. Why is this?
    Thanks.

  • #2
    The Ldapcontextsource has several properties in addition to the four you have in the sample config file. Look under the "Methods Inherited from AbstractContextSource" section of the Javadoc for a complete list: http://static.springsource.org/sprin...extSource.html

    When you set a property using <propery /> tag in a Spring bean, Spring invokes the setter method of the bean to set the property.

    Comment


    • #3
      re:

      Ok, I see them now, the properties are listed as private fields in abstractcontextsource source code here: http://www.jarvana.com/jarvana/view/...java?format=ok
      Thanks.

      Comment

      Working...
      X