在整合Dubbo与Springboot报的错误,在parent模块原有的基础上添加如下依赖解决问题
<dependency>
<groupId>com.alibaba.spring</groupId>
<artifactId>spring-context-support</artifactId>
<version>1.0.2</version>
</dependency>
Dubbo部分的完整依赖
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>com.gitee.reger</groupId>
<artifactId>spring-boot-starter-dubbo</artifactId>
<version>${dubbo-starter.version}</version>
</dependency>
<!--为dubbo整合spring提供支持-->
<dependency>
<groupId>com.alibaba.spring</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring-support.version}</version>
</dependency>
application.properties相关dubbo配置
#dubbo的配置
#dubbo的服务名称
spring.dubbo.application=user-web
#dubbo的通讯协议名称
spring.dubbo.protocol.name=dubbo
#zookeeper注册中心的地址
spring.dubbo.registry.address=192.168.64.130:2181
#zookeeper的通讯协议名称
spring.dubbo.registry.protocol=zookeeper
#dubbo的扫描路径
spring.dubbo.base-package=com.ky.gmall
#设置超时时间
spring.dubbo.consumer.timeout=600000
#默认为true,设置检查服务存在(false解决无法让consumer先启动的问题)
spring.dubbo.consumer.check=false