Closed norbertspiess closed 2 years ago
Spring Cloud Gateway docs say that "Spring Cloud Gateway requires the Netty runtime provided by Spring Boot and Spring Webflux" -- are you perhaps missing a Spring Webflux dependency?
Netty shading is not something we can remove in Spring Cloud GCP; it's integral to how the client libraries are built.
Even adding
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
doesn't resolve it. We have it in our Gateway project as well.
Important to know:
everything worked with spring cloud dependencies 2021.0.3.
So it stopped working with spring-cloud-dependencies 2021.0.4? It sounds like this issue belongs in the https://github.com/spring-cloud/spring-cloud-gateway repository.
opened a new issue over there... let's see what they have to say about it
Linking the Spring Cloud Gateway issue: https://github.com/spring-cloud/spring-cloud-gateway/issues/2769
I am going to close the issue in this repo, since this isn't a problem that can be resolved in Spring Cloud GCP. Most likely, there is some autoconfiguration that's triggered in Spring Cloud Gateway that relies on detection of something it finds in the shaded dependency but then can't actually use it.
Describe the bug When adding spring-cloud-gcp-starter-logging to a spring cloud gateway project, the applicaion (or spring test) fails with the following stacktrace:
Issue GCP starter logging ships netty, but only in the shaded variant. Shaded brings a different package structure.
Solution adding netty itself solves the issue, providing all necessary classes.
Sample gateway-cloud-dependencies.zip