gpt4 book ai didi

java - 验证文件 spring-ldap.xsd 时出错

转载 作者:数据小太阳 更新时间:2023-10-29 02:03:45 24 4
gpt4 key购买 nike

我的 bean 配置中有这个错误,但对于另一个项目有效..xml 是:

<?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:context="http://www.springframework.org/schema/context"
xmlns:ldap="http://www.springframework.org/schema/ldap"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/ldap http://www.springframework.org/schema/ldap/spring-ldap.xsd">

但是在一个项目中我有这个错误:

referenced file contains error http://www.springframework.org/schema/ldap/spring-ldap.xsd

最佳答案

更新:

我像这样修改我的光束并工作(我添加了 conf. 用于池化但并不重要):

<!-- LDAP config -->

<bean id="contextSourceTarget" class="org.springframework.ldap.core.support.LdapContextSource">
<property name="url" value="${ldap.url}" />
<property name="base" value="${ldap.base}" />
<property name="userDn" value="${ldap.userDn}" />
<property name="password" value="${ldap.password}" />
<property name="pooled" value="false" />
</bean>

<bean id="contextSource"
class="org.springframework.ldap.pool.factory.PoolingContextSource">
<property name="contextSource" ref="contextSourceTarget" />
</bean>

<bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
<constructor-arg ref="contextSource" />
</bean>

关于java - 验证文件 spring-ldap.xsd 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26700291/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com