dobbo xml校验红叉出错问题处理

Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'.
- schema_reference.4: Failed to read schema document 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the 

document is not <xsd:schema>.


虽然不影响运行,但看着毕竟不爽

处理办法:

1、搜索本地项目的maven依赖库,找到dobbo.jar。


2、解压dobbo-2.5.3.jar,在META-INF下面找到dubbo.xsd文件。

3、打开eclipse, window-->xml-->xmlCatalog-->add-->FileSystem,引入dubbo.xsd文件

4、修改key值http://code.alibabatech.com/schema/dubbo/dubbo.xsd


5、对着xml文件validate后红叉消失。


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Dubbo是一个基于Java的高性能RPC框架,可以用于构建分布式服务和微服务架构。在Dubbo中,XML配置文件被广泛用于配置服务提供者和消费者的相关参数。 以下是一个简单的Dubbo XML配置示例: ```xml <!-- 服务提供者配置 --> <dubbo:service interface="com.example.service.UserService" ref="userService"> <!-- 服务提供者的名称,用于注册到注册中心 --> <dubbo:parameter key="provider" value="dubbo-provider" /> <!-- 暴露的服务版本号 --> <dubbo:parameter key="version" value="1.0.0" /> </dubbo:service> <!-- 服务消费者配置 --> <dubbo:reference interface="com.example.service.UserService" id="userService"> <!-- 注册中心地址 --> <dubbo:registry address="zookeeper://127.0.0.1:2181" /> <!-- 服务消费者的名称 --> <dubbo:parameter key="consumer" value="dubbo-consumer" /> <!-- 引用的服务版本号 --> <dubbo:parameter key="version" value="1.0.0" /> </dubbo:reference> ``` 在上述示例中,`<dubbo:service>`元素用于配置服务提供者,指定了接口和实现类,通过`<dubbo:parameter>`元素可以配置一些额外的参数。`<dubbo:reference>`元素用于配置服务消费者,指定了接口和ID,通过`<dubbo:registry>`元素可以配置注册中心的地址。 当然,这只是一个简单的Dubbo XML配置示例,实际的配置可能会更加复杂,会涉及到更多的配置选项和参数。你可以根据自己的需求,来定制和扩展Dubbo的配置。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值