I am encountering the same issue as you. I am using the following versions in my pom.xml:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.1</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.7.0</version>
</dependency>
</dependencies>
I was facing the java.lang.NoSuchMethodError,
Caused by: java.lang.NoSuchMethodError: 'void org.springframework.web.method.ControllerAdviceBean.<init>(java.lang.Object)'
but I was able to resolve it by using @Hidden from SpringDoc. Specifically, you need to add @Hidden on your @RestControllerAdvice or @ControllerAdvice classes (see the documentation here: SpringDoc - How to hide an operation or controller).
@Slf4j
@Hidden
@RestControllerAdvice
public class GlobalHandler extends ResponseEntityExceptionHandler {
...
}
This solution provides a temporary fix while using the versions of Spring Boot and SpringDoc that I want, without causing any errors.