Spring Data JDBC - Features



  • Customizable NamingStrategy to achieve CRUD operations for simple aggregates.

  • Config based repository configuration through annotation @EnableJdbcRepositories.

  • Supports @Query annotations for writing custom queries.

  • Supports most of the databases like MySQL, PostgreSQL, H2, HSQLDB, Derby and many more.

  • Supports transactions.

  • It publishes application events for operations done on entities, some of them are BeforeSaveEvent, AfterSaveEvent, BeforeDeletEvent, AfterDeleteEvent, and AfterLoadEvent (when an aggregate get instantiated from the database).

  • It supports Auditing through annotation @EnableJdbcAuditing.

  • If you want to update or delete records through queries, you can use the annotation @Modifying

  • It can be integrated with MyBatis.

  • It forces us to think in aggregates (A design principle of DDD).

Advertisements