关于SpringCloud框架网关配置的@EnableZuulProxy注解出错问题

https://blog.csdn.net/qq_14809913/article/details/80590364学springcloud在搭建框架时,遇到了一个很奇怪的问题,在配置网关服务时,注解@EnableZuulProxy一直报错


add maven dependency也无济于事 

点击后在pom里自动配置了

spring-cloud-starter-zuul


但问题依然没有解决,网上百度也没看出过所以然  然后去官方看了一下zuul的源码  终于发现了问题

原来在SpringBoot2.0以上版本应该导入<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-zuul</artifactId> </dependency>这个依才行 

 

然后问题解决

文章标签:  springboot   zuul springcloud

https://blog.csdn.net/qq_14809913/article/details/80590364学springcloud在搭建框架时,遇到了一个很奇怪的问题,在配置网关服务时,注解@EnableZuulProxy一直报错


扫描二维码关注公众号,回复: 2292966 查看本文章

add maven dependency也无济于事 

点击后在pom里自动配置了

spring-cloud-starter-zuul


但问题依然没有解决,网上百度也没看出过所以然  然后去官方看了一下zuul的源码  终于发现了问题

原来在SpringBoot2.0以上版本应该导入<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-zuul</artifactId> </dependency>这个依才行 

 

然后问题解决

猜你喜欢

转载自blog.csdn.net/ssllkkyyaa/article/details/80906867