Swagger API error #32
-
While accessing swagger API, I get java.lang.NoSuchMethodError: 'void org.springframework.web.method.ControllerAdviceBean.(java.lang.Object)': I'm using Spring Boot 3.4.5 with springdoc-openapi-starter-webmvc-ui:2.3.0 to integrate Swagger UI in my Spring Boot REST application. I have shown the security configuration in the below:
I got the following error in my console
Is this because |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @roberta484 The error you got typically means there is a binary incompatibility between Spring Framework version you are using and the version that So I suggest to downgrade the Spring Boot to 3.18 Thanks |
Beta Was this translation helpful? Give feedback.
-
Seems like your issue is not caused by Tr to upgrade For more detailed explanantion, please check the stackoverflow. |
Beta Was this translation helpful? Give feedback.
Seems like your issue is not caused by
@ControllerAdvice
or your custom exception handling.I guess the actual root cause seems to be a version incompatibility between
springdoc-openapi-starter-webmvc-ui:2.30
andSpring Boot 3.4.5
Tr to upgrade
springdoc-openapi
to a compatible version from 2.3.0 to 2.3.1 or later. Its compatible with `Spring Boot 3.2+, so it will work with 3.4.5For more detailed explanantion, please check the stackoverflow.