In my case, the valid solution did not work. This was the version of spring-data-jpa dependency that did not match the right one to be used with Spring version 6.1.
Hoping it will help someone else.