dubbo本地直连一个程序既当提供者又当消费者问题

依赖

xml 复制代码
 <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.18</version>
    <relativePath/>
 </parent>
 
 <properties>
    <java.version>1.8</java.version>
    <dubbo.version>2.7.23</dubbo.version>
  </properties>

  <dependencies>
    <!-- Spring Boot Web -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <!-- Dubbo Spring Boot Starter -->
    <dependency>
      <groupId>org.apache.dubbo</groupId>
      <artifactId>dubbo-spring-boot-starter</artifactId>
      <version>${dubbo.version}</version>
    </dependency>

问题1:20880端口没有监听

解决1:registry-address: N/A

application.yml

复制代码
dubbo:
  protocol:
    name: dubbo
    port: 20880  
  registry:
    address: N/A  # 不使用注册中心,直连提供者

问题2:没有进行序列化和反序列化

解决2: @DubboReference中 injvm= false // 禁用 In-JVM

复制代码
 // 关键:使用 url 指定直连地址
 @DubboReference(
         url = "dubbo://127.0.0.1:20880/com.wc88.dubbo.service.GreetingService",
         check = false,  // 启动时不检查
         injvm=  false
 ) // Dubbo 的 @Reference
相关推荐
微学AI15 天前
百度、115、夸克太分散?用 LitePan 把多网盘和影音入口收拢到一起
dubbo
能源革命16 天前
AI 日报 2026-09-10
人工智能·dubbo
Meta3916 天前
PostgreSQL报SELECT rule‘s target entry X has different type from column “XXX“
数据库·postgresql·dubbo
vHelios16 天前
【电商项目】生成二维码测试报错Dubbo超时以及data无返回问题
dubbo
小马架构19 天前
Dubbo从入门到实践
dubbo
2601_9652354820 天前
快速了解docker
docker·容器·dubbo
互联网中的一颗神经元1 个月前
09. mheap:全局堆管理器
java·spring·dubbo
学编程的小程1 个月前
影音库不想反复扫网盘:LitePan 聚合多网盘,用 WebDAV 和 STRM 整理播放链路
dubbo
Likeadust1 个月前
应急调度看不清位置?集群对讲调度系统EasyDSS集群对讲调度室上线可配置地图
dubbo
zhanghaha13141 个月前
HTML系列教程:5_HTML 属性 超详细零基础讲解
dubbo