找了好久这个设置才找的
感觉特别珍贵
HashMap<String,String> envProperties = new HashMap<>();
envProperties.put("com.sun.jndi.ldap.connect.timeout","3000");
envProperties.put("com.sun.jndi.ldap.read.timeout","3000");
contextSourceBuilder.addPropertyValue("baseEnvironmentProperties",envProperties);
<bean id="contextSourceTargetApp"
class="org.springframework.ldap.core.support.LdapContextSource">
<property name="baseEnvironmentProperties">
<map>
<entry key="com.sun.jndi.ldap.connect.timeout" value="5000" />
</map>
</property>
</bean>
本文详细介绍了如何在Spring框架中使用LdapContextSource组件进行LDAP连接和读取超时时间的配置,通过示例展示了如何设置环境属性以优化LDAP操作的性能。
3006

被折叠的 条评论
为什么被折叠?



