Skip to content

Refactor code to not require Spring JDBC as mandatory dependency #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pull-vert opened this issue Apr 24, 2019 · 2 comments
Closed

Refactor code to not require Spring JDBC as mandatory dependency #100

pull-vert opened this issue Apr 24, 2019 · 2 comments
Labels
type: bug A general bug
Milestone

Comments

@pull-vert
Copy link
Contributor

pull-vert commented Apr 24, 2019

spring-jdbc is now an optional dependency, wich is a good thing !
But this leads to an error

java.lang.NoClassDefFoundError: org/springframework/jdbc/core/SqlProvider
...
at org.springframework.data.r2dbc.function.DefaultSqlResult.<init>(DefaultSqlResult.java:78) ~[spring-data-r2dbc-1.0.0.BUILD-SNAPSHOT.jar:1.0.0.BUILD-SNAPSHOT]

In DefaultSqlResult, this line does not compile anymore, because SqlProvider is a spring-jdbc Interface

interface SqlFunction<T, R> extends Function<T, R>, SqlProvider {}

Workaround is to add dependency on spring-jdbc in my project, but the fix would be to not depend anymore on spring-jdbc 😄

Maybe there are other spring-jdbc remaining uses in r2dbc.

@mp911de mp911de changed the title trully remove spring-jdbc requirement Refactor code to not require Spring JDBC as mandatory dependency Apr 24, 2019
@mp911de mp911de added the type: bug A general bug label Apr 24, 2019
@mp911de
Copy link
Member

mp911de commented Apr 24, 2019

Thanks for reporting the issue. We want to only provide optional features that build on Spring JDBC and we should not have mandatory dependencies in our code.

With the merge of #97 the left-over dependencies became visible.

@mp911de mp911de added this to the 1.0 M2 milestone Apr 24, 2019
mp911de added a commit that referenced this issue Apr 24, 2019
We now ship our own SqlProvider variant to not require Spring JDBC as mandatory dependency. Spring JDBC can be provided optionally to use SQL-code based exception translation.
@mp911de
Copy link
Member

mp911de commented Apr 24, 2019

That's fixed now.

@mp911de mp911de closed this as completed Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants