fix(build): bump springdoc to 2.8.6 for Spring Framework 6.2 compatibility - #1537
Merged
Conversation
…ility
GET /api-docs returned 500, breaking Swagger UI:
NoSuchMethodError: 'void ControllerAdviceBean.<init>(java.lang.Object)'
at GenericResponseService.lambda$getGenericMapResponse$8
springdoc 2.1.0 is built against Spring Framework 6.0 and calls
ControllerAdviceBean(Object) while walking @ControllerAdvice beans to build
the OpenAPI document. That constructor was deprecated in 6.0 and removed in
6.2. Bumping Spring Boot 3.3.5 -> 3.5.14 in 8f78c0a pulled in Spring
Framework 6.2 and left revSpringDoc at 2.1.0, so the call site no longer
resolves. It links lazily on first invocation, which is why the server starts
and every other endpoint works.
Adds a regression test that loads a context with an advice bean and requests
the document — the only thing that exercises the broken path.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
:conductor-kafka:test failed to build its Spring context under springdoc 2.8.6:
NoSuchMethodError: 'ObjectMapper io.swagger.v3.core.util.ObjectMapperFactory.createJson31()'
at org.springdoc.core.providers.ObjectMapperProvider.<init>
mockserver pulls io.swagger.core.v3:swagger-core 2.1.13 (pre-jakarta) via
swagger-parser. It ships the same io.swagger.v3.* packages as the
swagger-core-jakarta springdoc resolves, so whichever jar lands first on the
classpath wins, and the pre-jakarta copy lacks createJson31(). springdoc 2.1.0
never called it, so the duplicate-class conflict was latent.
Nothing in kafka/src references mockserver or testcontainers — both test
dependencies are unused, and they are the only source of the pre-jakarta
artifacts here. Removing them leaves only the jakarta ones on the classpath.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mp-orkes
force-pushed
the
fix/swagger-error
branch
from
August 13, 2026 23:50
5533bc5 to
96cc646
Compare
mp-orkes
marked this pull request as ready for review
August 13, 2026 23:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GET /api-docsreturns 500, so Swagger UI is unusable:springdoc 2.1.0 calls
ControllerAdviceBean(Object), removed in Spring Framework 6.2.8f78c0a78bumped Spring Boot 3.3.5 → 3.5.14 (Framework 6.1 → 6.2) and leftrevSpringDocat 2.1.0. It links lazily on first call, so the server starts clean and only/api-docsbreaks.Notes
@RestControllerAdviceinstead ofApplicationExceptionMapper— springdoc only needs some advice bean present, and importing the production one into a context breaksApplicationExceptionMapperTest, which installs a JVM-wide staticLoggerFactorymock into the shared Gradle test JVM.kafka/build.gradledrops two unused test deps. mockserver pulls the pre-jakartaio.swagger.core.v3:swagger-core, which duplicates springdoc'sswagger-core-jakartapackages and is missingObjectMapperFactory.createJson31()— enough to break the module's Spring context under 2.8.6. Nothing inkafka/srcreferences mockserver or testcontainers, so removing them leaves only the jakarta artifacts on the classpath.