Postgres database connection for Spring app (Java 21)
Dependencies: <dependencies> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> </dependencies> Properties short way: spring: datasource: url: jdbc:postgresql://localhost:5432/custom_database username: postgres password: password # if you want your app to auto create tables on start: # jpa: # hibernate: # ddl-auto: create And a little more advanced: spring: jpa: properties: hibernate: jdbc: time_zone: UTC datasource: url: jdbc:postgresql://localhost:5432/custom_database user...