Spring Cloud 只提供dubbo接口 应用层发布项目报 Unsupported protocol 问题修复

项目里面有一个项目使用的Spring Cloud 框架开发一个授权服务,此服务提供了dubbo接口,但是应用层每次发布的时候出现如下错误

错误信息:

java 复制代码
[DUBBO] Unsupported protocol., dubbo version: 3.1.6, current host: xxx.xxx.xxx.xxx, error code: 4-1. 
This may be caused by protocol extension does not installed, 
go to https://dubbo.apache.org/faq/4/1 to find instructions. ,

详细错误信息

java 复制代码
java.lang.IllegalStateException: Unsupported protocol rest in notified url: DefaultServiceInstance{serviceName='xxx-service', host='xxx.xxx.xxx.xxxx', port=8080, enabled=true, healthy=true, metadata={t=3, preserved.register.source=SPRING_CLOUD, __micro.service.app.id__=xxxxxxxxxxxx, opensergo.io/canary=xxxxxxxxxxxx}}, null from registry naco to consumer xxx.xxx.xxx.x, supported protocol: [dubbo, injvm, mock, registry, service-discovery-registry, tri]

原因

框架里面的配置

spring.cloud.nacos.discovery.enabled 默认是true, 授权服务启动的时候会在naco 里面注册一个服务名为【SPRING_CLOUD】的 ,这个协议包含reset, 但是调用方只支持了dubbo,就出现了上述错误。

解决方案:

java 复制代码
spring.cloud.nacos.discovery.enabled=false
相关推荐
云烟成雨TD8 小时前
Spring AI Alibaba 1.x 系列【62】时光旅行(Time-Travel)
java·人工智能·spring
卷毛的技术笔记9 小时前
Java后端硬核实战:用Spring AI Alibaba+Redis给LLM装上“超强记忆中枢”
java·人工智能·redis·后端·spring·ai·系统架构
北漂人Java11 小时前
SpringAI-2.Spring AI整合本地模型和云端大模型
java·spring
java1234_小锋11 小时前
利用Cursor AI编程 两小时实现 基于Spring AI 2.0的带智能客服的商城系统(带在线支付功能)
人工智能·spring·ai编程·智能客服·spring ai·ai智能客服
2601_9577875814 小时前
关键词矩阵系统:当搜索流量成为企业增长的“第二曲线“
矩阵·dubbo·关键词矩阵
weixin1997010801615 小时前
[特殊字符] 从1688接口设计,学习高可用API的最佳实践(附Python源码)
python·学习·spring
happyprince15 小时前
05-Hugging Face Transformers 缓存系统深度分析
java·spring·缓存
cg.family15 小时前
Spring生态启动过程
spring
invicinble18 小时前
对于spring的bean应该有哪些领域的认识
java·后端·spring
用户3983461612018 小时前
Go-Spring 实战第 11 课 —— 依赖注入的目标:单 Bean 注入和集合注入
spring·go