-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring Boot and OpenAPI not compatible #169
Comments
Also define the openapi version in the parent POM as its used by 4 services. <spring-openai.version>2.6.0</spring-openai.version> |
Now the Gateway server starts, using 2.6.0, but but when queried, http://localhost:8060/employee/ it dies and get this error: |
I then trie upgrading to Spring boot 3.4
and
The code all builds , the business services work but the Gateway now crashes, on start, with this error: gateway-service-1 | 2025-01-13 05:50:48 [,] - WARN Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apis' defined in pl.piomin.services.gateway.GatewayApplication: Unsatisfied dependency expressed through method 'apis' parameter 1: No qualifying bean of type 'org.springdoc.core.properties.SwaggerUiConfigParameters' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} |
All Fixed. The above is fixed with the new code for GatewayApplication.java, below, with the very latest Spring boot and OpenAPI 2.8.3 import org.slf4j.Logger; import org.springframework.boot.SpringApplication; import java.util.HashSet; import static org.springdoc.core.utils.Constants.DEFAULT_API_DOCS_URL; @SpringBootApplication
} |
Thanks for that issue. Could you kindly propose a PR for that? |
Done, see Boot 3.4.1 #171 |
The POM parent specifies spring boot 3.3.5
The gateway service has openapi version 2.8.2, but these require spring boot 3.4
The gateway does not start, Illegal State Exception. This is usually caused by imcompatable libraries.
changing down the openapi version to 2.6.0 works...
Maybe update the parent POM to latest spring boot version ?
Kim
The text was updated successfully, but these errors were encountered: