逻辑理解 :应用启动起来,dubbo就会扫描指定的包下带有@component注解的服务,将它发布在指定的注册中心中! 新版本 import org.apache.dubbo.config.annotation.DubboService; import org.springframework.stereotype.Service; @DubboService @Service // 这个时spring的注解,将他放在Spring容器中 public class TicketServiceIm...
编写SpringBoot启动类SpringBootMulticastProviderApplication.java,注意要添加@EnableDubbo注解: package com.bolingcavalry.springbootmulticastprovider;import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringB...
dubbo.application.name=xxxx dubbo.application.owner=xxxx dubbo.application.logger=slf4j dubbo.registry.address=zookeeper://zk.xxxx.com:2181 dubbo.monitor.protocol=registry dubbo.protocol.name=dubbo dubbo.protocol.port=20887 dubbo.service.loadbalance=roundrobin # dubbo \u8bbe\u8ba1\u7684\u65f6\u501...
SpringBoot+Dubbo+zookeeper项目创建 启动zookeeper 创建IDEA项目 创建服务提供者项目 provider-server 导入Dubbo和Zookeeper相关依赖 <!-- Dubbo Spring Boot Starter --> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-spring-boot-starter</artifactId> <version>2.7.3</version> </dependen...