In July 2022, I put together a “Lightning Talk” presentation on Java Records for my employer, InRhythm. In short, Java Records are a new data type added as a permanent feature in Java 16, with the goal of reducing some common boiler plate code. In particular this makes writing simple DTOs very quick and easy. You can check it out below:
Though I have only played with Java Records on a pet project for this presentation so far, I plan to dig into them more in the future.
References I leaned on for this talk:
- Bruce Eckel on Java Records: https://blogs.oracle.com/javamagazine/post/java-records-constructor-methods-inheritance
- Java 16 Records with JPA and jOOQ: https://72.services/java-16-records-with-jpa-and-jooq/
- The best way to use Java Records with JPA and Hibernate: https://vladmihalcea.com/java-records-jpa-hibernate/
You can access code samples from my talk at: https://github.com/tparton42/evette