Skip to content

Commit 56d740a

Browse files
fix : upgrade issues
1 parent 6a09b56 commit 56d740a

12 files changed

Lines changed: 12 additions & 27 deletions

File tree

aws-parameterstore-project/src/test/java/com/example/awsspring/web/controllers/CustomerControllerIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ void shouldReturn400WhenCreateNewCustomerWithoutText() throws Exception {
7878
.content(objectMapper.writeValueAsString(customer)))
7979
.andExpect(status().isBadRequest())
8080
.andExpect(header().string("Content-Type", is("application/problem+json")))
81-
.andExpect(jsonPath("$.type", is("about:blank")))
8281
.andExpect(jsonPath("$.title", is("Bad Request")))
8382
.andExpect(jsonPath("$.status", is(400)))
8483
.andExpect(jsonPath("$.detail", is("Invalid request content.")))

aws-parameterstore-project/src/test/java/com/example/awsspring/web/controllers/CustomerControllerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ void shouldReturn400WhenCreateNewCustomerWithoutText() throws Exception {
108108
.content(objectMapper.writeValueAsString(customer)))
109109
.andExpect(status().isBadRequest())
110110
.andExpect(header().string("Content-Type", is("application/problem+json")))
111-
.andExpect(jsonPath("$.type", is("about:blank")))
112111
.andExpect(jsonPath("$.title", is("Bad Request")))
113112
.andExpect(jsonPath("$.status", is(400)))
114113
.andExpect(jsonPath("$.detail", is("Invalid request content.")))

aws-secretmanager-project/src/test/java/com/example/awsspring/web/controllers/CustomerControllerIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ void shouldReturn400WhenCreateNewCustomerWithoutText() throws Exception {
7878
.content(objectMapper.writeValueAsString(customer)))
7979
.andExpect(status().isBadRequest())
8080
.andExpect(header().string("Content-Type", is("application/problem+json")))
81-
.andExpect(jsonPath("$.type", is("about:blank")))
8281
.andExpect(jsonPath("$.title", is("Bad Request")))
8382
.andExpect(jsonPath("$.status", is(400)))
8483
.andExpect(jsonPath("$.detail", is("Invalid request content.")))

aws-secretmanager-project/src/test/java/com/example/awsspring/web/controllers/CustomerControllerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ void shouldReturn400WhenCreateNewCustomerWithoutText() throws Exception {
108108
.content(objectMapper.writeValueAsString(customer)))
109109
.andExpect(status().isBadRequest())
110110
.andExpect(header().string("Content-Type", is("application/problem+json")))
111-
.andExpect(jsonPath("$.type", is("about:blank")))
112111
.andExpect(jsonPath("$.title", is("Bad Request")))
113112
.andExpect(jsonPath("$.status", is(400)))
114113
.andExpect(jsonPath("$.detail", is("Invalid request content.")))

aws-sns-project/src/main/java/com/learning/awssns/config/GlobalExceptionHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ ProblemDetail onException(MethodArgumentNotValidException methodArgumentNotValid
2727
ProblemDetail problemDetail =
2828
ProblemDetail.forStatusAndDetail(HttpStatusCode.valueOf(400), "Invalid request content.");
2929
problemDetail.setTitle("Constraint Violation");
30+
problemDetail.setType(URI.create("http://api.aws-sns-project.com/errors/validation"));
3031
List<ApiValidationError> validationErrorsList = methodArgumentNotValidException.getAllErrors().stream()
3132
.map(objectError -> {
3233
FieldError fieldError = (FieldError) objectError;

aws-sns-project/src/test/java/com/learning/awssns/common/ContainersConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public class ContainersConfig {
1313
@ServiceConnection
1414
LocalStackContainer localstackContainer() {
1515
return new LocalStackContainer(
16-
DockerImageName.parse("localstack/localstack").withTag("4.4.0"));
16+
DockerImageName.parse("localstack/localstack").withTag("4.13.0"));
1717
}
1818
}

aws-sqs-project/pom.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -162,24 +162,6 @@
162162
</execution>
163163
</executions>
164164
</plugin>
165-
<plugin>
166-
<groupId>org.hibernate.orm.tooling</groupId>
167-
<artifactId>hibernate-enhance-maven-plugin</artifactId>
168-
<version>${hibernate.version}</version>
169-
<executions>
170-
<execution>
171-
<id>enhance</id>
172-
<goals>
173-
<goal>enhance</goal>
174-
</goals>
175-
<configuration>
176-
<enableLazyInitialization>true</enableLazyInitialization>
177-
<enableDirtyTracking>true</enableDirtyTracking>
178-
<enableAssociationManagement>true</enableAssociationManagement>
179-
</configuration>
180-
</execution>
181-
</executions>
182-
</plugin>
183165
<plugin>
184166
<groupId>org.apache.maven.plugins</groupId>
185167
<artifactId>maven-compiler-plugin</artifactId>

aws-sqs-project/src/main/java/com/learning/awspring/exception/GlobalExceptionHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.learning.awspring.exception;
22

3+
import java.net.URI;
34
import java.util.Comparator;
45
import java.util.List;
56
import java.util.Objects;
@@ -25,6 +26,7 @@ ProblemDetail onException(MethodArgumentNotValidException methodArgumentNotValid
2526
ProblemDetail.forStatusAndDetail(
2627
HttpStatusCode.valueOf(400), "Invalid request content.");
2728
problemDetail.setTitle("Constraint Violation");
29+
problemDetail.setType(URI.create("http://api.aws-sqs-project.com/errors/validation"));
2830
List<ApiValidationError> validationErrorsList =
2931
methodArgumentNotValidException.getAllErrors().stream()
3032
.map(

aws-sqs-project/src/test/java/com/learning/awspring/web/controllers/CustomerControllerIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ void shouldReturn400WhenCreateNewCustomerWithoutText() throws Exception {
8080
.content(objectMapper.writeValueAsString(customer)))
8181
.andExpect(status().isBadRequest())
8282
.andExpect(header().string("Content-Type", is("application/problem+json")))
83-
.andExpect(jsonPath("$.type", is("about:blank")))
83+
.andExpect(
84+
jsonPath("$.type", is("http://api.aws-sqs-project.com/errors/validation")))
8485
.andExpect(jsonPath("$.title", is("Constraint Violation")))
8586
.andExpect(jsonPath("$.status", is(400)))
8687
.andExpect(jsonPath("$.detail", is("Invalid request content.")))

aws-sqs-project/src/test/java/com/learning/awspring/web/controllers/CustomerControllerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ void shouldReturn400WhenCreateNewCustomerWithoutText() throws Exception {
107107
.content(objectMapper.writeValueAsString(customer)))
108108
.andExpect(status().isBadRequest())
109109
.andExpect(header().string("Content-Type", is("application/problem+json")))
110-
.andExpect(jsonPath("$.type", is("about:blank")))
110+
.andExpect(
111+
jsonPath("$.type", is("http://api.aws-sqs-project.com/errors/validation")))
111112
.andExpect(jsonPath("$.title", is("Constraint Violation")))
112113
.andExpect(jsonPath("$.status", is(400)))
113114
.andExpect(jsonPath("$.detail", is("Invalid request content.")))

0 commit comments

Comments
 (0)