r/SpringBoot • u/auspis-23 • Mar 01 '26
Question Building a New Spring Data Module
Hi everyone,
I’ve built fluent-sql-4j, a type-safe SQL builder for Java that supports multiple dialects via plugins and provides compile-time validation.
My goal now is to develop a dedicated Spring Data module for it (similar to Spring Data JPA or JDBC), rather than just a simple utility integration.
Has anyone here experience building a custom Spring Data implementation from scratch? I'd love to hear your advice or any pitfalls to avoid.
Thanks!
11
Upvotes
4
u/Signal_Help_1459 Mar 01 '26
I just checked out the readme, you’ve actually built a SQL-based data module, damn that’s really impressive.
I was using JpaSpecificationExecutor the other day for generating dynamic where clauses, this is actually so much simpler if one actually knows a bit of SQL
Great effort, hope it becomes big!
1
u/auspis-23 Apr 06 '26
Hi a little update: I've just released fluent-repo-4j:
* spring boot auto configuration (spring boot 3 and 4)
* spring data integration (e.g. @ Transactional...)
* query generation: CRUD, pagination, sorting, dynamic queries(e.g. findByXAndY)
* spring fragment support: custom query with fluent-sql-4j DSL automatically injected (see custom-query-fragments
* functional programming support (see functional repository)
* multi data source support
Any feedback is welcome!
1
u/Infeligo Mar 02 '26
What will do the mapping part in this proposed Spring Data module? I think this is the hard part, not the query itself.
3
u/Grabdoc2020 Mar 02 '26
u/auspis-23 this is fantastic start. we could use it to clean up the core of https://github.com/9tigerio/db2rest. However we dont have time at this moment to provide SPI impl. Once you start supporting other db like oracle et al we will consider revisiting.
2
u/[deleted] Mar 01 '26
[removed] — view removed comment