Reputation: 31
I want to use Spring Cloud Zuul
without SpringBoot
. We have an existing project with Spring but I'm having trouble to configure Zuul
without SpringBootApplication
.
When I use @EnableZuulProxy annotation, I get the following error:
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulProxyConfiguration': Unsatisfied dependency expressed through field 'discovery'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.cloud.client.discovery.DiscoveryClient' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
No qualifying bean of type 'org.springframework.cloud.client.discovery.DiscoveryClient' available
And why it needs a discovery client?
Can I use spring-cloud-starter-zuul dependency without spring-boot?
Upvotes: 3
Views: 1676
Reputation: 25177
No, but you can use zuul directly via the Netflix OSS bits https://github.com/Netflix/zuul/wiki/Getting-Started
Upvotes: 1