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>这个依才行
然后问题解决
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>这个依才行
然后问题解决