通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明报错问题


dubbo版本:2.6.4

provider提供者配置文件如下:

<?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">
    <dubbo:application name="01_provider"/>
    <bean id="someService" class="com.serviceImpl.SomeServiceImpl"/>
    <dubbo:service interface="com.service.SomeServiceI"
                   ref="someService"
                   registry="N/A"/>
</beans>

启动时会报错:通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明。

解决:在 schemaLocation 中加入 http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd 即可

改变后的配置:

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM