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@OneToOnerelation/api/tchr/create- Insert data into@OneToManyrelation. Just for demonstration, data will be automatically populated into the table with@OneToManyrelation usingCommandLineRunner/api/movie/create- Insert data into@ManyToManyrelation
The application will be starting on port
8082and 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