Hello.
Using Spring Data 2.7.0 (from spring-data-bom version 2021.2.0) and having com.github.jsqlparser
in the classpath prevent application to start if repositories use native queries with hibernate placeholders like h-schema
. It failing early with net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "{" "{"
.
I did not find ability to turn off that feature. The decision to use JSqlParserQueryEnhancer
instead of DefaultQueryEnhancer
is made in static way in QueryEnhancerFactory.
My project is based on Spring Boot 2.6.8 and in order to mitigate this issue I had switched from shipped spring-data-bom version 2021.1.4 to 2021.2.0. This solved mentioned critical issue but introduced new one :(
Here is test project to help reproduce that issue. Just run CountryRepositoryTest
.
Thanks in advance.