DEV Community

Marko
Marko

Posted on

Spring Crud Generator v1.2.0 — Improved DB Compatibility, JSON Collections, and More Reliable Docker Runs

v1.2.0 is all about making the generator smoother to use in real projects: more predictable migrations across databases, fewer Docker Compose surprises, and better JSON support for collection-based fields. Along the way, there’s also internal refactoring to keep the codebase easier to maintain and extend.

Highlights

✅ Better database migration compatibility

This release improves Flyway script generation so migrations behave more consistently across MySQL, MariaDB, MSSQL, and PostgreSQL. The goal here is simple: fewer “works on my DB” moments when switching environments or adding a second database target.

  • More robust Flyway migration output for cross-database scenarios
  • Improved compatibility with newer MySQL versions (> 8.4)

🧠 JSON type support — now with collections

The JSON type has been extended to better match how modern APIs model data. In addition to single-object JSON fields, you can now generate JSON columns for collections:

  • JSON<List<Type>>
  • JSON<Set<Type>>

This makes it much easier to model things like tags, attributes, nested configs, and other “structured but flexible” data without bending the domain model.

🐳 Docker Compose that behaves like you expect

If you’ve ever had your Spring Boot container start before the database is ready (and crash/retry until it is), this update fixes that at the Compose level.

  • Added healthchecks so the application starts only after database services are actually ready
  • Fixed Docker Compose configuration around exposed vs internal ports, reducing confusion and runtime issues

Fixes

  • Fixed Flyway scripts when using reserved SQL keywords (reserved keywords are now supported)
  • Fixed unique constraint naming for consistent, correct constraint generation
  • Updated .openapi-generator-ignore to avoid regenerating/overwriting:
    • pom.xml
    • README.md, Readme.md, readme.md

Internal Improvements

  • Refactored internal structure to improve maintainability and future extensibility
  • Added a project banner that prints useful runtime metadata (version + source/output paths), which helps a lot when running generator pipelines or debugging CI logs

Demo Repository

To make it easier to see the expected output and integration flow, there’s now a dedicated demo repository:


If you’re upgrading from earlier versions, v1.2.0 should be a drop-in update in most setups. The main benefits will show up immediately if you target multiple DBs, rely on JSON-mapped fields, or run everything through Docker Compose.
Repo: https://github.com/mzivkovicdev/spring-crud-generator

Top comments (0)