JPA Entity Relationships(Mappings), ex- @OneToOne, @ManyToOne etc.
No need to setup external Relational DB, H2 in-memory database used that supports JDBC API and R2DBC access, with a small (2mb) footprint.
Data can be inserted using the below endpoints and JSON to save data availabe here
/api/emp/create
- Insert data into@OneToOne
relation/api/tchr/create
- Insert data into@OneToMany
relation. Just for demonstration, data will be automatically populated into the table with@OneToMany
relation usingCommandLineRunner
/api/movie/create
- Insert data into@ManyToMany
relation
The application will be starting on port
8082
and the port can be changed from here
- Spring Boot
- Spring Data JPA with Hibernate
- H2
- Git 2.24.0
- IntelliJ IDEA 2021.1.1.1
- Gradle