Closed
Description
Spring Boot 2.4.6 and 2.4.7 broke compatibility between Page result type and @query annotation on same method.
A method with this signature used to work up to Spring Boot 2.4.5:
@Query("{\"match_phrase_prefix\":{\"stringValue\":\"?0\"}}")
Page<MyDomainObj> findByStringPrefix(String stringValue, Pageable pageable);
Starting from Spring Boot 2.4.6 whenever the code access to the objects inside the List a class cast exception is thrown.
See the attached test project.
The problem is shown with current setup. To replace it's behaviour with the previous version just replace Spring Boot version in pom.xml