Data Persistence in Spring Apps | provision PostgreSQL DB locally via Docker and in Cloud

Опубликовано: 02 Апрель 2026
на канале: kanezi
729
31

Part 6 of spring social 2 cloud series.
In this part we'll add relational database support, connect our app to PostgreSQL database and persist our user.
We'll use docker to spin up local instance of database.
We'll provision PostgreSQL database with our cloud provider railway.app and connect our deployed app to provisioned database.
We'll explore ORM - Object relational features of JPA - Jakarta persistence API and see how to map Java classes to relational database tables.
We'll pay close attention to relationship annotations of JPA - @OneToMany and @ManyToOne and discuss how to reason about them.

Railway.app:
https://tinyurl.com/railway-kanezi

Github repo:
https://github.com/kanezi/spring-soci...

00:00:00 - intro
00:02:07 - local db instance
00:05:51 - spring data support
00:07:58 - dev profile
00:09:12 - db schema - orm
00:19:18 - crow's foot notation
00:22:13 - ORM relationships
00:27:12 - adding / removing authorities
00:31:57 - repositories
00:34:56 - persistent app user service
00:50:01 - db migration with liquibase
00:58:55 - provision db on railway.app
01:04:04 - what's next