Рет қаралды 6,416
In this video we will configure database connection with H2 using spring properties and autoconfiguration. Later we will learn how to use inheritance together with JPA and Hibernate in Java Spring Boot. We will create super class (parent class) and then two sub-classes (child classes) which will inherit all of the properties and mapping information from parent class. We will use @Inheritance annotation to specify strategy which we will use. This time it will be TABLE_PER_CLASS strategy. In the final stage we will learn how to use inheritance in case of repositories which we will use to persist our entities into the database. Also we will check out how to handle mutliple beans implementation using @Primary annotation. We will track everything using H2 web console. Keep coding!
Joined table source code: github.com/codeforgeyt/jpa-in...
Joined table video: • Java Spring Boot - JPA...
Single table source code: github.com/codeforgeyt/jpa-in...
Single table video: • Java Spring Boot - JPA...
Superclass source code: github.com/codeforgeyt/jpa-in...
Superclass video: • Java Spring Boot - JPA...
Table per class source code: github.com/codeforgeyt/jpa-in...
Table per class video: • Java Spring Boot - JPA...
Follow //CodefForgeYT on:
FB: / codeforgeyt
Twitter: / codeforgeyt
GitHub: github.com/codeforgeyt
Instagram: / codeforgeyt