spring-projects / spring-data-relational

Spring Data Relational. Home of Spring Data JDBC and Spring Data R2DBC.
https://spring.io/projects/spring-data-jdbc
Apache License 2.0
737 stars 339 forks source link

Switch `com.github.jsqlparser:jsqlparser` to `test` scope #1796

Closed luizleite-hotmart closed 1 month ago

luizleite-hotmart commented 1 month ago

If you have both spring-boot-starter-data-r2dbc and spring-boot-starter-data-jpa in the same project, these two libraries in version 3.3 of Spring Boot use com.github.jsqlparser:jsqlparser but in different versions. This causes some methods that were added in version 4.9 to not exist in version 4.6, such as net.sf.jsqlparser.statement.select.Values

mp911de commented 1 month ago

jsqlparser is a test-only dependency, you can safely exclude it on Spring Data JDBC. It should never been a production dependency.

sombriks commented 4 weeks ago

hey, thanks for the explanation! for anyone landing here with similar issue, besides read carefully the related issues, you can add the following dependency explicitly until it gets resolved on next release:

    testImplementation("com.github.jsqlparser", "jsqlparser", "4.9")