解决【BUILD FAILURE】2 errors程序包org.springframework.cloud.netflix.zuul不存在;StarterZuul.java:[10,2] 找不到符号

zuulClient Maven install报错信息:

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< com.carina:zuul-client >-----------------------
[INFO] Building zuul-client 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.springframework.cloud:spring-cloud-starter-eureka:jar:1.4.0.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.springframework.cloud:spring-cloud-starter-config:jar:1.4.0.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.springframework.cloud:spring-cloud-starter-zuul:jar:1.4.0.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ zuul-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ zuul-client ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to F:\Ec\eclipse64\zuul-client\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /F:/Ec/eclipse64/zuul-client/src/main/java/com/carina/StarterZuul.java:[5,46] 程序包org.springframework.cloud.netflix.zuul不存在
[ERROR] /F:/Ec/eclipse64/zuul-client/src/main/java/com/carina/StarterZuul.java:[10,2] 找不到符号
  符号: 类 EnableZuulProxy
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.319 s
[INFO] Finished at: 2022-04-27T15:21:34+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project zuul-client: Compilation failure: Compilation failure: 
[ERROR] /F:/Ec/eclipse64/zuul-client/src/main/java/com/carina/StarterZuul.java:[5,46] 程序包org.springframework.cloud.netflix.zuul不存在
[ERROR] /F:/Ec/eclipse64/zuul-client/src/main/java/com/carina/StarterZuul.java:[10,2] 找不到符号
[ERROR]   符号: 类 EnableZuulProxy
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

解决方案:

Edgware.RELEASE改为Dalston.RELEASE

SpringCloud版本:

 我的SpringBoot版本:

<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.5.9.RELEASE</version>
</parent> 

可参考以下文章对应版本

SpringCloud与SpringBoot的版本对应关系_richest_qi的博客-CSDN博客_springboot和springcloud版本对应关系在SpringCloud官网(https://spring.io/projects/spring-cloud)可以看到,当前(2021年11月),SpringCloud的最新GA版本是2020.0.4这一版。除了2020.0.X版本外,SpringCloud之前的版本名称是伦敦地铁站的站名命名,且首字母顺序与版本时间顺序一致,如,AngelBrixtonCamdenDalstonEdgwareFinchleyGreenwichHoxton当SpringCloud的发布内容积累到临界点或https://blog.csdn.net/qzw752890913/article/details/121073738

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值