You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 year ago | |
---|---|---|
.github | 2 years ago | |
.mvn/wrapper | 2 years ago | |
config | 2 years ago | |
docker | 2 years ago | |
gradle/wrapper | 2 years ago | |
src | 1 year ago | |
.drone.yaml | 2 years ago | |
.gitattributes | 3 years ago | |
.gitignore | 2 years ago | |
LICENSE | 13 years ago | |
NOTICE | 13 years ago | |
README.md | 1 year ago | |
build.gradle | 1 year ago | |
gradlew | 2 years ago | |
gradlew.bat | 2 years ago | |
mvnw | 2 years ago | |
mvnw.cmd | 2 years ago | |
pom.xml | 1 year ago | |
settings.gradle | 2 years ago |
README.md
jpa-hospital-example
This project is a example of using jpa.
The project uses the Spock Framework Example Project
Prerequisites
-
JDK 17 or higher
-
Maven use
mvnw
wrapper -
Gradle use
gradlew
wrapper
Building with Gradle
Downloaded files (including the Gradle distribution itself) will be stored in the Gradle user home directory (typically user_home/.gradle
).
Type: test
./gradlew clean test
Type: build
./gradlew clean build
Type: preparation
- create a folder, for example,
project
. - copy
jpa_hospital_example-2.0.1.jar
from a release to the folder.- if you build the application from source, find the file (
jpa_hospital_example-2.0.1-all.jar
) inbuild/libs/
.
- if you build the application from source, find the file (
- copy docker/docker-compose.yml to the folder.
- turn up the database in the
project/docker
:docker-compose up -d
- wait a minute while the database is bootstrapping.
- now you can connect with the application.
Type: run
After the preparation, run the application in the folder, for example, project
:
java -jar jpa_hospital_example-2.0.1.jar
Building with Maven
Downloaded files will be stored in the local Maven repository (typically user_home/.m2/repository
).
Type: test
./mvnw clean test
Type: build
./mvnw clean package
Type: preparation
- create a folder, for example,
project
. - copy
jpa_hospital_example-version.jar
from a release to the folder.- if you build the application from source, find the file in
target/
.
- if you build the application from source, find the file in
- copy docker/docker-compose.yml to the folder.
- turn up the database in the
project/docker
:docker-compose up -d
- wait a minute while the database is bootstrapping.
- now you can connect with the application.
Type: run
After the preparation, run the application in the folder, for example, project
:
java -jar jpa_hospital_example-2.0.1.jar
Author
Kostiantyn Klochko (c) 2023