-
Notifications
You must be signed in to change notification settings - Fork 6
Library4: API Rest Library Book Author @ManyToMany @OneToMany CRUD with Swagger and Inherence
Albert edited this page Jun 3, 2022
·
20 revisions
Welcome to the cifojava2022-3 wiki!
- Base project:
- POM
-
1:n
relationship: unidrectional or bidirectional- @Entity
book
andList<Book>
- Author @Entity
- @Entity
-
1:1
relationship-
library
andaddress
@Entity
-
-
n:m
@Entitybook
andlibrary
- Annotations:
- @OneToMany
- @ManyToMany
- @JoinColumn
- @OneToOne
- @ManyToMany
- @JoinTable
- Swagger: URL swagger : http://localhost:8080/swagger-ui.html
- JUnit Jupiter to test
- DataBase H2:
Library4
-
First-time CREATE DDL : First-time CREATE DDL option (after that
UPDATE
) inapplication.properties
- Application.properties
- Command Line Runner with methods to test and JavaFaker
- @Service, @CrudRepository JPA 2.0, @Component
-
First-time CREATE DDL : First-time CREATE DDL option (after that
-
n:m
with1:n
andn:1
, with @Entityborrow
-
getUUID
, spring doc -
Audit, as a Abstract class, example
-
Inherence, Inheritance for a JPA Entity and Interface
@MappedSuperclass //not @Entity public class Book{ @Id //private long bookId; private UUid bookId; private String title; // constructor, getters, setters } @Entity public class BookItem extends Book{ private long bookItemId; private boolean isLost; // constructor, getters, setters }
-
JPQL : Java Persistence/JPQL
-
DTO, Data Transfer Object :
- Data Transfer Object DTO is an object that carries data between processes.
- Martin Fowlwer's article
-
Create QR
-
UML back-end, done by draw.io
-
Tentative draft-UML to study and to start working:
-
-
version 1.0 : basic project from
library2
andlibrary3
-
Tree project
-
by Java Cifo 2022 IFCD53 Desenvolupament en Java amb framework Spring