You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Upgrade to Spring Boot 3.4.1;
- Upgrade to Mapstruct 1.6.3;
- Upgrade to Apache Maven 3.9.9;
- Upgrade to Elasticsearch docker image 8.15.4;
- Rename docker-build.sh to build-docker-images.sh;
- Refactor the way docker images are built;
- Refactor docker-compose.yml file;
- Add SpringDataWebSupportConfig to fix warning;
- Update README.
* Some containerization tool https://www.docker.com[`Docker`], https://podman.io[`Podman`], etc.
27
27
28
28
== Start Environment
29
29
30
-
* Open a terminal and navigate to `springboot-elasticsearch-thymeleaf` root folder run:
30
+
* Open a terminal and navigate to the `springboot-elasticsearch-thymeleaf` root folder run:
31
31
+
32
32
[source]
33
33
----
@@ -38,14 +38,14 @@ docker compose up -d
38
38
+
39
39
[source]
40
40
----
41
-
docker compose ps
41
+
docker ps -a
42
42
----
43
43
44
44
== Initialize Elasticsearch
45
45
46
46
NOTE: In the following steps, we will create an index, an alias and do a reindex using pre-defined scripts. In case you prefer to do it step-by-step calling `Elasticsearch` API, refer to link:create-index-alias-reindex.adoc[Creating indexes, alias and reindexing using Elasticsearch API].
47
47
48
-
* In a terminal, make sure you are in `springboot-elasticsearch-thymeleaf` root folder;
48
+
* In a terminal, make sure you are in the `springboot-elasticsearch-thymeleaf` root folder;
49
49
50
50
* Run the following script to create the index `ecommerce.products.v1` with the alias `ecommerce.products` (you can use the default values by just pressing `Enter` on every user input):
51
51
+
@@ -76,7 +76,7 @@ So, the script `./reindex.sh` aims to fix it, setting the type `keyword` to the
76
76
77
77
== Running applications using Maven
78
78
79
-
Below are the steps to start and run the applications using `Maven`. We will need to open a terminal for each one. Make sure you are in `springboot-elasticsearch-thymeleaf` root folder while running the commands.
79
+
Below are the steps to start and run the applications using `Maven`. We will need to open a terminal for each one. Make sure you are in the `springboot-elasticsearch-thymeleaf` root folder while running the commands.
80
80
81
81
* **product-api**
82
82
+
@@ -95,12 +95,12 @@ Below are the steps to start and run the applications using `Maven`. We will nee
95
95
== Running applications as Docker containers
96
96
97
97
* Build Docker Images
98
-
** In a terminal, make sure you are in `springboot-elasticsearch-thymeleaf` root folder;
98
+
** In a terminal, make sure you are in the `springboot-elasticsearch-thymeleaf` root folder;
99
99
** Run the following script:
100
100
+
101
101
[source]
102
102
----
103
-
./docker-build.sh
103
+
./build-docker-images.sh
104
104
----
105
105
106
106
* Environment Variables
@@ -126,7 +126,7 @@ Below are the steps to start and run the applications using `Maven`. We will nee
126
126
|===
127
127
128
128
* Run Docker containers
129
-
** In a terminal, make sure you are in `springboot-elasticsearch-thymeleaf` root folder;
129
+
** In a terminal, make sure you are in the `springboot-elasticsearch-thymeleaf` root folder;
** If they were started with `Maven`, go to `product-api` and `product-ui` terminals and press `Ctrl+C`;
159
-
** If they were started as Docker containers, go to a terminal and, inside `springboot-elasticsearch-thymeleaf` root folder, run the script below:
159
+
** If they were started as Docker containers, go to a terminal and, inside the `springboot-elasticsearch-thymeleaf` root folder, run the script below:
160
160
+
161
161
[source]
162
162
----
163
163
./stop-apps.sh
164
164
----
165
-
* To stop and remove docker compose containers, network and volumes, go to a terminal and, inside `springboot-elasticsearch-thymeleaf` root folder, run the following command:
165
+
* To stop and remove docker compose containers, network and volumes, go to a terminal and, inside the `springboot-elasticsearch-thymeleaf` root folder, run the following command:
166
166
+
167
167
[source]
168
168
----
@@ -171,7 +171,7 @@ docker compose down -v
171
171
172
172
== Cleanup
173
173
174
-
To remove the Docker images created by this project, go to a terminal and, inside `springboot-elasticsearch-thymeleaf` root folder, run the script below:
174
+
To remove the Docker images created by this project, go to a terminal and, inside the `springboot-elasticsearch-thymeleaf` root folder, run the script below:
The reason this configuration class was added is to prevent the following WARN message from occurring.
10
+
11
+
WARN Serializing PageImpl instances as-is is not supported, meaning that there is no guarantee about the stability of the resulting JSON structure!
12
+
For a stable JSON structure, please use Spring Data's PagedModel (globally via @EnableSpringDataWebSupport(pageSerializationMode = VIA_DTO))
13
+
or Spring HATEOAS and Spring Data's PagedResourcesAssembler as documented in https://docs.spring.io/spring-data/commons/reference/repositories/core-extensions.html#core.web.pageables.
0 commit comments