![](/img/trans.png)
[英]Spring 3.0 — Unable to locate Spring NamespaceHandler for XML schema namespace context
[英]unable to locate spring namespacehandler for xml schema namespace context
運行 jar 文件后,出現錯誤“無法找到 xml 模式命名空間上下文的 spring 命名空間處理程序”。
java -jar someJar.jar
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.1.8.RELEASE</version>
</dependency>
xmlns:context="http://www.springframework.org/schema/context"
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
我可以看到相同的 url 粘貼了兩次:- http://www.springframework.org/schema/context ,但是下面的定義希望對您有用,因為我們需要提供似乎錯過的模式位置
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
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-4.3.xsd">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.