From 5986ca26fec02ff1fbebee0dba33b91c04288b88 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 18 Jul 2023 10:58:57 +0200 Subject: [PATCH 1/8] README: add instructions to install jdk 17 and gradle 7.6.2 on Ubuntu 22.02 --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 1106e9da..4ce7c081 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,20 @@ To be able to build and run the Java Spring Boot application, you need the follo (JDK 17.x will be automatically installed by Gradle toolchain support) - Gradle in some not too outdated version (7.4 will be installed via wrapper) +For Ubuntu 22.02: + + sudo apt install -y openjdk-17-jdk + # see https://gradle.org/releases/ for direct link to current release 7.2.6 + export VERSION=7.2.6 + wget https://services.gradle.org/distributions/gradle-7.2.6-bin.zip?-.... -O gradle-${VERSION}-bin.zip + sudo unzip -d /opt/gradle gradle-${VERSION}-bin.zip + cd /opt/gradle && sudo ln -s gradle-${VERSION} latest && cd - + sudo nano /etc/profile.d/gradle.sh + export GRADLE_HOME=/opt/gradle/latest + export PATH=${GRADLE_HOME}/bin:${PATH} + sudo chmod +x /etc/profile.d/gradle.sh + source /etc/profile.d/gradle.sh + You also might need an IDE (e.g. *IntelliJ IDEA* or *Eclipse* or *VS Code* with *[STS](https://spring.io/tools)* and a GUI Frontend for *PostgreSQL* like *Postbird*. If you have at least Docker, the Java JDK and Gradle installed in appropriate versions and in your `PATH`, then you can start like this: -- 2.39.5 From 796d1a0991e2e6301bd07beedce14226a5d3830f Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Wed, 19 Jul 2023 09:43:06 +0200 Subject: [PATCH 2/8] README: use gradlew instead of gradle wrapper add instructions for starting the postgresql docker container if the container has been built already --- README.md | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4ce7c081..7d9b9a91 100644 --- a/README.md +++ b/README.md @@ -56,32 +56,22 @@ To be able to build and run the Java Spring Boot application, you need the follo (JDK 17.x will be automatically installed by Gradle toolchain support) - Gradle in some not too outdated version (7.4 will be installed via wrapper) -For Ubuntu 22.02: - - sudo apt install -y openjdk-17-jdk - # see https://gradle.org/releases/ for direct link to current release 7.2.6 - export VERSION=7.2.6 - wget https://services.gradle.org/distributions/gradle-7.2.6-bin.zip?-.... -O gradle-${VERSION}-bin.zip - sudo unzip -d /opt/gradle gradle-${VERSION}-bin.zip - cd /opt/gradle && sudo ln -s gradle-${VERSION} latest && cd - - sudo nano /etc/profile.d/gradle.sh - export GRADLE_HOME=/opt/gradle/latest - export PATH=${GRADLE_HOME}/bin:${PATH} - sudo chmod +x /etc/profile.d/gradle.sh - source /etc/profile.d/gradle.sh - You also might need an IDE (e.g. *IntelliJ IDEA* or *Eclipse* or *VS Code* with *[STS](https://spring.io/tools)* and a GUI Frontend for *PostgreSQL* like *Postbird*. If you have at least Docker, the Java JDK and Gradle installed in appropriate versions and in your `PATH`, then you can start like this: cd your-hsadmin-ng-directory - gradle wrapper # downloads the configured Gradle version into the project + ./gradlew # downloads the configured Gradle version into the project source .aliases # creates some comforable bash aliases, e.g. 'gw'='./gradlew' gw test # compiles and runs unit- and integration-tests + # if the container has not been built yet, run this: pg-sql-run # downloads + runs PostgreSQL in a Docker container on localhost:5432 + # if the container has been built already, run this: + docker start hsadmin-ng-postgres + gw bootRun # compiles and runs the application on localhost:8080 # the following command should reply with "pong": -- 2.39.5 From 51c658cdc74196d60d1899a6fb8c4c23fd407c4c Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Wed, 19 Jul 2023 14:19:54 +0200 Subject: [PATCH 3/8] no need to install gradle anymore --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d9b9a91..9a0a4b6f 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,8 @@ To be able to build and run the Java Spring Boot application, you need the follo - Docker 20.x (on MacOS you also need *Docker Desktop* or similar) - PostgreSQL Server 13.7-bullseye (see instructions below to install and run in Docker) -- Java JDK at least recent enough to run Gradle +- Java JDK at least recent enough to run Gradle Wrapper (gradlew) (JDK 17.x will be automatically installed by Gradle toolchain support) -- Gradle in some not too outdated version (7.4 will be installed via wrapper) You also might need an IDE (e.g. *IntelliJ IDEA* or *Eclipse* or *VS Code* with *[STS](https://spring.io/tools)* and a GUI Frontend for *PostgreSQL* like *Postbird*. -- 2.39.5 From 0edc2cca91c5b4d31f29c739ad938e2781c7651d Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 4 Sep 2023 20:23:57 +0200 Subject: [PATCH 4/8] add dependancy for swagger-ui / springdoc-openapi according to https://www.baeldung.com/spring-rest-openapi-documentation and https://central.sonatype.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui/2.2.0 --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 29ad0e23..1be9d95f 100644 --- a/build.gradle +++ b/build.gradle @@ -67,6 +67,7 @@ dependencies { implementation 'org.apache.commons:commons-text:1.10.0' implementation 'org.modelmapper:modelmapper:3.1.0' implementation 'org.iban4j:iban4j:3.2.3-RELEASE' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' compileOnly 'org.projectlombok:lombok' testCompileOnly 'org.projectlombok:lombok' -- 2.39.5 From 1c19afefa6150a053ad2909bb7c77a5b7ee4b7a2 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 4 Sep 2023 20:37:40 +0200 Subject: [PATCH 5/8] avoid error in openapi for ambigous mapping for findRelationshipRelatedToPersonUuid --- .../hs/office/relationship/HsOfficeRelationshipRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipRepository.java b/src/main/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipRepository.java index 8b9e10fe..a55f2272 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipRepository.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipRepository.java @@ -20,7 +20,7 @@ public interface HsOfficeRelationshipRepository extends Repository findRelationshipRelatedToPersonUuid(@NotNull UUID personUuid); + List findRelationshipRelatedToPersonUuid2(@NotNull UUID personUuid); @Query(value = """ SELECT p.* FROM hs_office_relationship_rv AS p -- 2.39.5 From bdac90595833265eb42f0e55b2bb00399ce50c25 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 2 Jan 2024 09:50:02 +0100 Subject: [PATCH 6/8] adjust README --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9a0a4b6f..0151c326 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,9 @@ To be able to build and run the Java Spring Boot application, you need the follo - Docker 20.x (on MacOS you also need *Docker Desktop* or similar) - PostgreSQL Server 13.7-bullseye (see instructions below to install and run in Docker) -- Java JDK at least recent enough to run Gradle Wrapper (gradlew) +- Java JDK at least recent enough to run Gradle (JDK 17.x will be automatically installed by Gradle toolchain support) +- Gradle in some not too outdated version (7.4 will be installed via wrapper) You also might need an IDE (e.g. *IntelliJ IDEA* or *Eclipse* or *VS Code* with *[STS](https://spring.io/tools)* and a GUI Frontend for *PostgreSQL* like *Postbird*. @@ -61,7 +62,7 @@ If you have at least Docker, the Java JDK and Gradle installed in appropriate ve cd your-hsadmin-ng-directory - ./gradlew # downloads the configured Gradle version into the project + gradle wrapper # downloads the configured Gradle version into the project source .aliases # creates some comforable bash aliases, e.g. 'gw'='./gradlew' gw test # compiles and runs unit- and integration-tests @@ -69,7 +70,7 @@ If you have at least Docker, the Java JDK and Gradle installed in appropriate ve # if the container has not been built yet, run this: pg-sql-run # downloads + runs PostgreSQL in a Docker container on localhost:5432 # if the container has been built already, run this: - docker start hsadmin-ng-postgres + pg-sql-start gw bootRun # compiles and runs the application on localhost:8080 -- 2.39.5 From 70d73d8caaacc0e77a0c9d90bf9783dc98236ab1 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 2 Jan 2024 10:30:52 +0100 Subject: [PATCH 7/8] added gradlew again --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 0151c326..13a10ad0 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,6 @@ To be able to build and run the Java Spring Boot application, you need the follo (see instructions below to install and run in Docker) - Java JDK at least recent enough to run Gradle (JDK 17.x will be automatically installed by Gradle toolchain support) -- Gradle in some not too outdated version (7.4 will be installed via wrapper) You also might need an IDE (e.g. *IntelliJ IDEA* or *Eclipse* or *VS Code* with *[STS](https://spring.io/tools)* and a GUI Frontend for *PostgreSQL* like *Postbird*. @@ -62,7 +61,7 @@ If you have at least Docker, the Java JDK and Gradle installed in appropriate ve cd your-hsadmin-ng-directory - gradle wrapper # downloads the configured Gradle version into the project + ./gradlew # downloads the configured Gradle version into the project source .aliases # creates some comforable bash aliases, e.g. 'gw'='./gradlew' gw test # compiles and runs unit- and integration-tests -- 2.39.5 From 95457980d851a20ce518c1816dde97c23463cd06 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 2 Jan 2024 10:35:47 +0100 Subject: [PATCH 8/8] use alias gw --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 13a10ad0..c184591f 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,8 @@ If you have at least Docker, the Java JDK and Gradle installed in appropriate ve cd your-hsadmin-ng-directory - ./gradlew # downloads the configured Gradle version into the project - source .aliases # creates some comforable bash aliases, e.g. 'gw'='./gradlew' + source .aliases # creates some comfortable bash aliases, e.g. 'gw'='./gradlew' + gw # downloads the configured Gradle version into the project gw test # compiles and runs unit- and integration-tests -- 2.39.5