Starting from Spring Boot version 2.7.5 spring cannot bind null. It's binding it as binding parameter [1] as [VARCHAR] - [] and it should be binding parameter [1] as [VARCHAR] - [null].
@Query("SELECT s FROM Skill s WHERE (?1 IS NULL OR s.skillName like ?1)")
Page<Skill> searchSkills(String search, Pageable pageable);
Comment From: wilkinsona
Thanks for the report. I can't tell if you're reporting a problem with something that used to work or have just found what may be a new problem. Either way, Spring Boot itself isn't involved with generating SQL queries and is very unlikely to be the cause. You've mentioned Hibernate so that's one possible cause. Another could be Spring Data JPA is you're using it. Please spend some time trying to narrow down the cause of the problem and then report it in the appropriate place. If this is something that used to work, you may want to try downgrading Hibernate or Spring Data JPA to see if it fixes the problem. If you're looking for some general guidance, asking a question on Stack Overflow is a good place to start.