Closed Lzw2016 closed 5 years ago
Please update dependencies in your Maven pom.xml
, like this:
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>0.2.0</version>
</dependency>
<!-- Dubbo -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.6.5</version>
</dependency>
<!-- Spring Context Extras -->
<dependency>
<groupId>com.alibaba.spring</groupId>
<artifactId>spring-context-support</artifactId>
<version>1.0.2</version>
</dependency>
配置如下
设置服务暴露端口
20881
版本如下
代码如下
但是服务启动后暴露端口依然是
20880
, 不想每个服务都用@Service(protocol = {"dubbo"})
指定协议