-
-
Notifications
You must be signed in to change notification settings - Fork 535
Closed
Labels
invalidThis doesn't seem rightThis doesn't seem right
Description
Describe the bug
- When using Spring Boot 3.5.3 (Spring Framework 6.2.x) with springdoc-openapi-starter-webmvc-ui:2.5.0, I get the following error when accessing Swagger: java.lang.NoSuchMethodError: 'void org.springframework.web.method.ControllerAdviceBean.(java.lang.Object)'
- I found that Spring Framework 6.2.x has removed the constructor ControllerAdviceBean(Object) which SpringDoc 2.5.0 depends on.
To Reproduce
Steps to reproduce the behavior:
- Use Spring Boot 3.5.3 (spring-boot-starter-web).
- Add springdoc-openapi-starter-webmvc-ui:2.5.0.
- Access /swagger-ui/index.html or /v3/api-docs.
- Application throws NoSuchMethodError and Swagger does not load.
-Spring Boot version: 3.5.3
- Spring Framework version: 6.2.8
- SpringDoc version: 2.5.0
- Expected Result: Swagger UI should load without errors.
- Actual Result: Application crashes with NoSuchMethodError.
Expected behavior
- A clear and concise description of what you expected to happen.
- What is the expected result using OpenAPI Description (yml or json)?
Screenshots & SampleCode


@RestControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(Exception.class)
public ResponseEntity<String> handleAll(Exception e) {
return ResponseEntity.status(500).body("Internal Server Error");
}
}
Additional context
- Upgrading SpringDoc to 2.8.9 resolves the issue.
- This issue seems to come from Spring Framework 6.2.x API changes.
- It would help if Spring Boot - SpringDoc compatibility is documented more clearly.
chgangaraju
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem right