2

我正在尝试集成 spring 和 Apache solr。为此,我正在尝试 NamespaceHandler http://www.springframework.org/schema/data/solr。但这给了我以下错误。任何人都可以帮助我。

<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:oxm="http://www.springframework.org/schema/oxm" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:task="http://www.springframework.org/schema/task" 
xmlns:solr="http://www.springframework.org/schema/data/solr"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/oxm
http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/data/solr
http://www.springframework.org/schema/data/solr/spring-solr.xsd
">

这会导致错误

Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/data/solr]Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]

提前感谢您的帮助..

4

1 回答 1

0

如果这是一个新项目,您应该从Spring Boot开始并将 Spring Data Solr 添加到其中。有如何做到这一点的示例项目。您还可以使用 Spring Boot 和 Spring Data Solr 检查真实项目以进行自动完成

于 2015-01-04T04:11:58.100 回答