谷粒商城基础篇爬坑笔记--No Feign Client for loadBalancing defined以及加载测试失败

在尝试远程调用的代码时,遇到'No Feign Client for loadBalancing defined'错误,原因是Spring Boot和Spring Cloud版本过高,缺少负载均衡组件。解决方案是将版本回退到2.1.8.RELEASE和Greenwich.SR3,以匹配教程版本。此外,降低版本后可能出现编译时跳过测试的需求,推荐以此版本为微服务标准,避免类似问题。
摘要由CSDN通过智能技术生成

在远程调用章节写完代码运行member模块开启失败,报错信息为:

No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer?

原因:
spring cloud版本过高之后,没有包含负载均衡的包
解决方法:
手动降低SpringBoot及SpringCloud的版本与老师的版本一致

SpringBoot版本:2.1.8.RELEASE
SpringCloud版本:Greenwich.SR3
版本
修改后可能会引入一个新的错误:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project gulimall-product: There are test failures.

Please refer to D:\Program\SpringBoot\gulimallAll\gulimall\gulimall-product\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

修改方法在编译过程中跳过测试:


                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值