In my case, it was caused by the version of Spring Boot I was using. I was using version 3.1.0, then switched to newer version 3.1.10 and the problem was gone.