Maven编译dubbo.xsd问题解决办法

问题:运行dubbo-demo工程报错:

Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://dubbo.apache.org/schema/dubbo]
Offending resource: class path resource [META-INF/spring/dubbo-demo-provider.xml]

解决

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
       xmlns="http://www.springframework.org/schema/beans"
       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">
    ...
/>

改为

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
       http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
    ...
/>
上一篇 FastJson及Gson定义字段别名
下一篇 dubbo-admin编译及部署
目录
文章列表
1 Spring Boot之@ControllerAdvice
Spring Boot之@ControllerAdvice
2
高中数学基础:集合与函数
高中数学基础:集合与函数
3
Ant Design Upload组件
Ant Design Upload组件
4
Nginx if多条件判断
Nginx if多条件判断
5
Spring Cloud Gateway 动态路由
Spring Cloud Gateway 动态路由
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。