zoukankan      html  css  js  c++  java
  • Unable to locate Spring NamespaceHandler for XMLschemanamespace http://dubbo.apache.org/schema/dubbo

    Spring通过XML整合dubbo的过程控制台包如下错误:

        Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://dubbo.apache.org/schema/dubbo]

    配置如下:

    <?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:dubbo="http://dubbo.apache.org/schema/dubbo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd"> 
    <dubbo:application name="hello-world-app" /> 
    <dubbo:registry address="multicast://224.5.6.7:1234" />
     <dubbo:protocol name="dubbo" port="20880" /> 
    <dubbo:service interface="com.alibaba.dubbo.demo.DemoService" ref="demoServiceLocal" /> <dubbo:reference id="demoServiceRemote" interface="com.alibaba.dubbo.demo.DemoService" /> </beans>

    最后发现从http://dubbo.apache.org/zh-cn/docs/user/configuration/xml.html网站复制的有问题

     将 http://dubbo.apache.org/schema/dubbo/dubbo.xsd

    上面配置为这个一直报错,改为以下

    http://code.alibabatech.com/schema/dubbo/dubbo.xsd   

    正确配置:

    <?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:dubbo="http://code.alibabatech.com/schema/dubbo"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans.xsd 
         http://code.alibabatech.com/schema/dubbo
         http://code.alibabatech.com/schema/dubbo/dubbo.xsd">

    微信公众号

                              
  • 相关阅读:
    关于扩展欧几里得算法___基础,基础中的基础
    bzoj 2152聪聪可可
    poj1741 树上的点分治
    POJ1201 区间
    codevs 2756树上的路径
    zoj1260 king
    栈与队列应用:迷宫问题(DFS非最短路径)
    估值为一亿的AI核心代码
    栈与队列应用:计算前缀表达式的值
    栈与队列:循环队列算法+可执行代码
  • 原文地址:https://www.cnblogs.com/niugang0920/p/12187598.html
Copyright © 2011-2022 走看看