Loading repository data…
Loading repository data…
ivangfr / repository
The goal of this project is to study JPA Batch Processing (i.e., inserting, updating, or deleting a set of records in a single command) and JPA Locking.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
The goal of this project is to study JPA Batch Processing (i.e., inserting, updating, or deleting a set of records in a single command) and JPA Locking.
On ivangfr.github.io, I have compiled my Proof-of-Concepts (PoCs) and articles. You can easily search for the technology you are interested in by using the filter. Who knows, perhaps I have already implemented a PoC or written an article about what you are looking for.
graph TB
subgraph "springboot-jpa-studies"
JpaBatch["jpa-batch<br/>(Port 8081)"]
JpaLocking["jpa-locking<br/>(Port 8082)"]
end
subgraph "Compose"
MySQL[(MySQL)]
PostgreSQL[(PostgreSQL)]
end
JpaBatch --> MySQL
JpaBatch --> PostgreSQL
JpaLocking --> MySQL
JpaLocking --> PostgreSQL
erDiagram
Partner ||--o{ VoucherCode : has
Partner {
Long id PK
String name
}
VoucherCode {
Long id PK
String code
boolean deleted
Long partner_id FK
}
erDiagram
Player ||--o{ StarCollection : collects
StarCollection {
Long id PK
Integer numCollected
Integer numAvailable
Long version
Long player_id FK
}
Player ||--o{ Life : claims
Player {
Long id PK
String username
}
Life {
Long id PK
Long version
Long player_id FK "nullable"
}
Open one terminal and inside the springboot-jpa-studies root folder run:
docker compose up -d
MySQL
MySQL interactive terminal (mysql)
docker exec -it -e MYSQL_PWD=secret mysql mysql -uroot --database studiesdb
Type
exitto exit
PostgreSQL
Postgres interactive terminal (psql)
docker exec -it postgres psql -U postgres -d studiesdb
Type
\qto exit
In a terminal, make sure you are inside the springboot-jpa-studies root folder;
To stop and remove docker compose containers, networks and volumes, run:
docker compose down -v
In a terminal, make sure you are in the springboot-jpa-studies root folder;
The commands below will run the test cases of all modules. In order to run just the tests of a specific module check the module README;
During the tests, Testcontainers automatically starts Docker containers of the databases before the tests begin and shuts the containers down when the tests finish;
Using MySQL
./mvnw clean test -DargLine="-Dspring.profiles.active=mysql-test"
Using PostgreSQL
./mvnw clean test -DargLine="-Dspring.profiles.active=postgres-test"
This project enforces consistent Java formatting using the Spotless Maven plugin with google-java-format (GOOGLE style).
Check formatting:
./mvnw spotless:check
Auto-fix formatting:
./mvnw spotless:apply
Formatting is enforced automatically during ./mvnw verify.
If you find this useful, consider buying me a coffee:
This project is licensed under the MIT License.