Persisting data

Obviously, you are free to use any persistence technology such as relational databases, document stores, key-value stores, and graph databases according to your needs. Nevertheless, this section gives insights on the recommended ways to integrate a persistence technology to your Play project.

As the persistence layer is usually independent of the HTTP layer, Play is agnostic to which persistence layer you use. However, most persistence layers need configuration settings, so you need a way to inject these settings to your persistence technology from your application. A common way to achieve this is to define a Play plugin. The next sections show how to integrate a relational database using the provided JDBC and JPA plugins.

Using ...

Get Play Framework Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.