Closed chrisdadej closed 8 years ago
A pom.xml or build.gradle and config files would be helpful in diagnosing the problem.
Hi Spencer,
build.gradle files for all the three cases (including the parent build.gradle that they all share) attached. Let me know what else I can send through - or if there's anything specific I should run on my end to grab some additional debugging information.
build.gradle - microservice 1.txt build.gradle - microservice 2.txt build.gradle - parent.txt build.gradle - turbine.txt
The first problem is this one: https://github.com/spring-cloud/spring-cloud-stream/issues/339, so well ignore that here. Please open separate issue for the turbine thing. Which leaves the serverProperties()
thing to deal with here. A simple sample project that reproduces the problem will be very helpful.
@dsyer - thanks! Issue #1 solved Issue #2 (Code available here) simply run 'gradle run' (I couldn't upload the zip file as apparently ZIP's are supported despite the message show hehe, even tried with a gz) Turbine Issue - I'll try and create an equivalent example and raise it as a separate issue.
Fixed the second issue (the Codecentric guys were using ZuulConfiguration
in an autoconfig so it created a bean of type ServerProperties
in a way that isn't normal in a regular user app).
Brilliant - thanks again :)
@dsyer Is ok how we used the ZuulConfiguration
or is there something we should change about it?
It's OK. The bug was in ZuulConfiguration.
@dsyer I still have the issue using spring-boot:1.3.5
and spring-cloud:Brixton.SR1
during tests contextLoads
(no problem when launching app)
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulProxyConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected org.springframework.boot.autoconfigure.web.ServerProperties org.springframework.cloud.netflix.zuul.ZuulConfiguration.server; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.boot.autoconfigure.web.ServerProperties] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
...
I don't think that's the same error. Maybe open and new issue and include a link to a sample project.
Just open on #1094
This is not the repository for spring cloud gateway. This is a different error
Sorry, just realised. Removed the post
Code base defines the Spring Cloud and Spring Netflix versions across all the components. (Note: the springCloudStarterVersion is a relic from previous snapshot releases that were being tested last year so is probably not required).
Some components run fine, others now pop up with 'No qualifying bean of type xxx' errors. e.g.
First type of error - Microservice #1
Second type of error - Microservice #2 (essentially the same error but on a different bean definition - I'm not sure where a bean called 'server.CONFIGURATION_PROPERTIES' would even be defined)
Third type of error - Turbine
Leaving everything else as is and switching the netflix version to Milestone 4, i.e.
makes everything work once again so I'm not sure if this is: a) as a result of code changes in Milestone 5; or b) more likely, due to some dependency that was introduced in Milestone 5 that Spring Boot auto config is reading and executing.
Any help with this would be greatly appreciated.