在远程调用章节写完代码运行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.
修改方法在编译过程中跳过测试: