Skip to content

Commit ce64b09

Browse files
author
Ivan Franchin
committed
project update
- update spring-boot to 2.4.6; - update springdoc-openapi to 1.5.9; - rename docker image profix to ivanfranchin; - add ErrorAttributesConfig class to product-ui; - update maven-wrapper.properties.
1 parent 5298283 commit ce64b09

File tree

7 files changed

+36
-8
lines changed

7 files changed

+36
-8
lines changed

.mvn/wrapper/maven-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
22
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

README.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Below are the steps to start and run the applications using `Maven`. We will nee
149149
|Specify port of the `Eureka` service discovery to use (default `8761`)
150150
|===
151151

152-
* Start Docker containers
152+
* Run Docker containers
153153
** In a terminal, make sure you are in `springboot-elasticsearch-thymeleaf` root folder
154154
** Run the following script
155155
+

images/load-balancer-error.png

45.3 KB
Loading

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.4.5</version>
8+
<version>2.4.6</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111

@@ -21,7 +21,7 @@
2121
<spring-cloud.version>2020.0.2</spring-cloud.version>
2222
<jib-maven-plugin.version>3.0.0</jib-maven-plugin.version>
2323
<openjdk-image.version>11.0.11</openjdk-image.version>
24-
<docker-image.prefix>docker.mycompany.com</docker-image.prefix>
24+
<docker-image.prefix>ivanfranchin</docker-image.prefix>
2525
</properties>
2626

2727
<modules>

product-api/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<properties>
1717
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
1818
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
19-
<springdoc-openapi.version>1.5.8</springdoc-openapi.version>
19+
<springdoc-openapi.version>1.5.9</springdoc-openapi.version>
2020
</properties>
2121

2222
<dependencies>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.mycompany.productui.config;
2+
3+
import org.springframework.boot.web.error.ErrorAttributeOptions;
4+
import org.springframework.boot.web.error.ErrorAttributeOptions.Include;
5+
import org.springframework.boot.web.servlet.error.DefaultErrorAttributes;
6+
import org.springframework.boot.web.servlet.error.ErrorAttributes;
7+
import org.springframework.context.annotation.Bean;
8+
import org.springframework.context.annotation.Configuration;
9+
import org.springframework.web.context.request.WebRequest;
10+
11+
import java.util.Map;
12+
13+
@Configuration
14+
public class ErrorAttributesConfig {
15+
16+
@Bean
17+
public ErrorAttributes errorAttributes() {
18+
return new DefaultErrorAttributes() {
19+
@Override
20+
public Map<String, Object> getErrorAttributes(WebRequest webRequest, ErrorAttributeOptions options) {
21+
return super.getErrorAttributes(webRequest,
22+
options.including(Include.EXCEPTION, Include.MESSAGE, Include.BINDING_ERRORS));
23+
24+
}
25+
};
26+
}
27+
28+
}

start-apps.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ docker run -d --rm --name eureka \
99
-p 8761:8761 \
1010
--network springboot-elasticsearch-thymeleaf_default \
1111
--health-cmd="curl -f http://localhost:8761/actuator/health || exit 1" --health-start-period=30s \
12-
docker.mycompany.com/eureka-server:1.0.0
12+
ivanfranchin/eureka-server:1.0.0
1313

1414
wait_for_container_log "eureka" "Started"
1515

@@ -21,7 +21,7 @@ docker run -d --rm --name product-api \
2121
-e EUREKA_HOST=eureka -e ELASTICSEARCH_HOST=elasticsearch \
2222
--network springboot-elasticsearch-thymeleaf_default \
2323
--health-cmd="curl -f http://localhost:8080/actuator/health || exit 1" --health-start-period=30s \
24-
docker.mycompany.com/product-api:1.0.0
24+
ivanfranchin/product-api:1.0.0
2525

2626
wait_for_container_log "product-api" "Started"
2727

@@ -33,7 +33,7 @@ docker run -d --rm --name product-ui \
3333
-e EUREKA_HOST=eureka \
3434
--network springboot-elasticsearch-thymeleaf_default \
3535
--health-cmd="curl -f http://localhost:8080/actuator/health || exit 1" --health-start-period=30s \
36-
docker.mycompany.com/product-ui:1.0.0
36+
ivanfranchin/product-ui:1.0.0
3737

3838
wait_for_container_log "product-ui" "Started"
3939

0 commit comments

Comments
 (0)