开发者社区 问答 正文

dubbo环境搭建报错?报错

有人遇到这个问题吗?弄了一天了,还是一直报错

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'.

    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

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

    <dubbo:application name="dubbo-rets" />
    <dubbo:registry address="zookeeper://127.0.0.1:2181" />
    <dubbo:reference id="userService" interface="com.huc.service.impl.UserServiceImpl" />
</beans>

展开
收起
爱吃鱼的程序员 2020-06-09 15:33:51 634 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    xml配置是不是有特殊字符呀什么的呀dubbo包没有引入?<spanstyle="font-size:13.3333px;">应该是dubbo相关jar包没有引入,或导入到工程运行环境下所导致的

    2020-06-09 15:34:08
    赞同 展开评论