SpringCloud架构搭建常见问题

本文总结了在搭建SpringCloud架构过程中遇到的问题,包括SpringBoot启动找不到属性文件、版本不匹配、端口配置错误、依赖版本找不到、模块引入重复、编译和打包失败等,并提供了相应的解决方法和参考资料。
摘要由CSDN通过智能技术生成

最近搭建SpringCloud架构,踩了不少坑,主要问题有以下这些:

一、SpringBoot无法启动,找不属性文件

DiscoveryClient_UNKNOWN/windows10.microdone.cn - was unable to refresh its cache! status = Cannot execute request on any known server

错误原因:
application.yml 文件找不到,见application.properties文件改成application.yml 即可
关于application.yml 与 application.properties区别,可以看我的另外一篇文章

https://blog.csdn.net/weixin_41003771/article/details/103086603

二、Hoxton 、Greenwich等版本

新建一个eureka模块后,发现怎么都启动不起来,springboot一直报错,经过多次查找,发现是SpringCloud和SpringBoot不匹配问题

SpringCloud有很多版本,不同版本,需要的SpringBoot版本也不一样,具体可参照以下:

spring-cloud:
      "Finchley.M2": "Spring Boot >=2.0.0.M3 and <2.0.0.M5",
      "Finchley.M3": "Spring Boot >=2.0.0.M5 and <=2.0.0.M5",
      "Finchley.M4": "Spring Boot >=2.0.0.M6 and <=2.0.0.M6",
      "Finchley.M5": "Spring Boot >=2.0.0.M7 and <=2.0.0.M7",
      "Finchley.M6": "Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1",
      "Finchley.M7": "Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2",
      "Finchley.M9": "Spring Boot >=2.0.0.RELEASE and <=2.0.0.RELEASE",
      "Finchley.RC1": "Spring Boot >=2.0.1.RELEASE and <2.0.2.RELEASE",
      "Finchley.RC2": "Spring Boot >=2.0.2.RELEASE and <2.0.3.RELEASE"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值