Skip to content

Commit f208667

Browse files
author
Ivan Franchin
committed
Project upgrade
- upgrade to Java 21; - upgrade to spring-boot 3.3.6; - upgrade to spring-cloud 2023.0.3; - upgrade to springdoc-openapi 2.6.0; - upgrade to MapStruct 1.6.3; - upgrade to jib-maven-plugin 3.4.4; - upgrade to amazoncorretto-jdk 21.0.5; - upgrade wrapperVersion to 3.3.2 and apache-maven to 3.9.9; - upgrade to mysql docker image 9.0.1; - upgrade to bitnami/mongodb docker image 7.0.14; - update README.
1 parent 9e1c2cb commit f208667

File tree

8 files changed

+356
-452
lines changed

8 files changed

+356
-452
lines changed

.mvn/wrapper/maven-wrapper.jar

-61.1 KB
Binary file not shown.
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

README.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# springboot-graphql-databases
22

3-
The goal of this project is to explore [`GraphQL`](https://graphql.org). For it, we will implement two [`Spring Boot`](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/) Web Java applications: `author-book-api` and `book-review-api`.
3+
The goal of this project is to explore [`GraphQL`](https://graphql.org). For it, we will implement two [`Spring Boot`](https://docs.spring.io/spring-boot/index.html) Web Java applications: `author-book-api` and `book-review-api`.
44

55
> **Note**: In [`kubernetes-minikube-environment`](https://github.com/ivangfr/kubernetes-minikube-environment/tree/master/author-book-review-graphql) repository, it's shown how to deploy this project in `Kubernetes` (`Minikube`).
66
@@ -10,8 +10,8 @@ On [ivangfr.github.io](https://ivangfr.github.io), I have compiled my Proof-of-C
1010

1111
## Additional Readings
1212

13-
- \[**Medium**\] [**Implementing and Securing a Spring Boot GraphQL API with Keycloak**](https://medium.com/javarevisited/implementing-and-securing-a-spring-boot-graphql-api-with-keycloak-c461c86e3972)
14-
- \[**Medium**\] [**Implementing and Securing a Spring Boot GraphQL API with Okta**](https://medium.com/javarevisited/implementing-and-securing-a-spring-boot-graphql-api-with-okta-78bc997359b4)
13+
- \[**Medium**\] [**Implementing and Securing a Spring Boot GraphQL API with Keycloak**](https://medium.com/@ivangfr/implementing-and-securing-a-spring-boot-graphql-api-with-keycloak-c461c86e3972)
14+
- \[**Medium**\] [**Implementing and Securing a Spring Boot GraphQL API with Okta**](https://medium.com/@ivangfr/implementing-and-securing-a-spring-boot-graphql-api-with-okta-78bc997359b4)
1515

1616
## Project Diagram
1717

@@ -29,13 +29,13 @@ On [ivangfr.github.io](https://ivangfr.github.io), I have compiled my Proof-of-C
2929

3030
## Frontend applications
3131

32-
In the repository [`react-graphql-databases`](https://github.com/ivangfr/react-graphql-databases), I have implemented two [`ReactJS`](https://reactjs.org/) applications `author-book-ui` and `book-review-ui` that are frontend applications for `author-book-api` and `book-review-api`, respectively.
32+
In the repository [`react-graphql-databases`](https://github.com/ivangfr/react-graphql-databases), I have implemented two [`ReactJS`](https://react.dev) applications `author-book-ui` and `book-review-ui` that are frontend applications for `author-book-api` and `book-review-api`, respectively.
3333

3434
If you want to see the complete communication frontend-backend using `GraphQL`, clone the `react-graphql-databases` and follow the README instructions.
3535

3636
## Prerequisites
3737

38-
- [`Java 17+`](https://www.oracle.com/java/technologies/downloads/#java17)
38+
- [`Java 21+`](https://www.oracle.com/java/technologies/downloads/#java21)
3939
- [`Docker`](https://www.docker.com/)
4040

4141
## Start Environment
@@ -116,7 +116,7 @@ In a terminal and inside `springboot-graphql-databases` root folder, run followi
116116

117117
- **book-review-api**
118118

119-
1. In a browser, access http://localhost:9080/graphiql;
119+
1. In a browser, access http://localhost:9080/graphiql
120120

121121
2. Create a book and return its id:
122122
```
@@ -155,7 +155,7 @@ In a terminal and inside `springboot-graphql-databases` root folder, run followi
155155
156156
- **author-book-api**
157157
158-
1. In a browser, access http://localhost:8080/graphiql;
158+
1. In a browser, access http://localhost:8080/graphiql
159159
160160
2. Create an author and return the author id:
161161
```
@@ -224,7 +224,7 @@ In a terminal and inside `springboot-graphql-databases` root folder, run followi
224224
225225
- **Zipkin**
226226
227-
It can be accessed at http://localhost:9411.
227+
It can be accessed at http://localhost:9411
228228
229229
- **MySQL monitor**
230230
```
@@ -263,16 +263,8 @@ To remove the Docker images created by this project, go to a terminal and, insid
263263
./remove-docker-images.sh
264264
```
265265
266-
## TODO
267-
268-
- implement test cases;
269-
- use [`HttpGraphQlClient`](https://docs.spring.io/spring-graphql/docs/1.0.0/reference/html/#client) to call `book-review` instead of `feign` (we need to convert to project to `WebFlux`);
270-
- study how to implement authentication/authorization to `GraphQL` endpoint;
271-
- implement `graphql` subscription;
272-
273266
## References
274267
275268
- https://graphql.org/learn
276-
- https://www.pluralsight.com/guides/building-a-graphql-server-with-spring-boot
269+
- https://www.pluralsight.com/resources/blog/guides/building-a-graphql-server-with-spring-boot
277270
- https://www.baeldung.com/spring-graphql
278-
- https://docs.spring.io/spring-cloud-openfeign/docs/current/reference/html/

author-book-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<description>Demo project for Spring Boot</description>
1515

1616
<properties>
17-
<springdoc-openapi.version>2.5.0</springdoc-openapi.version>
17+
<springdoc-openapi.version>2.6.0</springdoc-openapi.version>
1818
</properties>
1919

2020
<dependencies>

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ services:
22

33
mysql:
44
container_name: mysql
5-
image: mysql:8.3.0
5+
image: mysql:9.0.1
66
restart: unless-stopped
77
ports:
88
- "3306:3306"
@@ -15,7 +15,7 @@ services:
1515
test: "mysqladmin ping -u root -p$${MYSQL_ROOT_PASSWORD}"
1616

1717
mongodb:
18-
image: bitnami/mongodb:7.0.6
18+
image: bitnami/mongodb:7.0.14
1919
container_name: mongodb
2020
ports:
2121
- "27017:27017"

0 commit comments

Comments
 (0)