Skip to content

Commit c8f1e31

Browse files
committed
Upgrade Spring Boot to 3.5.13 and Spring Cloud to 2025.0.1
- Bump Spring Boot from 3.2.4 to 3.5.13 - Bump Spring Cloud from 2023.0.5 to 2025.0.1 (compatible with Boot 3.5.x) - Remove commons-io dependency from FeignErrorDecoder, use InputStream.readAllBytes() instead (commons-io is no longer a transitive dependency of Spring Cloud 2025.0.x) - Fix duplicate WireMock stub mapping IDs that caused InvalidInputException with newer WireMock versions
1 parent b362d93 commit c8f1e31

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import java.io.File
44
plugins {
55
id 'checkstyle'
66
id 'io.spring.dependency-management' version '1.1.7'
7-
id 'org.springframework.boot' version '3.2.4'
7+
id 'org.springframework.boot' version '3.5.13'
88
id 'com.github.ben-manes.versions' version '0.53.0'
99
id 'java-library'
1010
id 'maven-publish'

src/main/java/uk/gov/hmcts/reform/payments/client/config/FeignErrorDecoder.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
import feign.Response;
44
import feign.codec.ErrorDecoder;
55
import lombok.extern.slf4j.Slf4j;
6-
import org.apache.commons.io.IOUtils;
76
import uk.gov.hmcts.reform.payments.client.InvalidPaymentRequestException;
87

98
import java.io.IOException;
10-
import java.io.InputStream;
119
import java.nio.charset.StandardCharsets;
1210

1311
@Slf4j
@@ -36,8 +34,7 @@ public Exception decode(String methodKey, Response response) {
3634

3735
private byte[] getBytes(Response response) {
3836
try {
39-
InputStream inputStream = response.body().asInputStream();
40-
return IOUtils.toByteArray(inputStream);
37+
return response.body().asInputStream().readAllBytes();
4138
} catch (IOException e) {
4239
log.error("Failed to read the response body with error: ", e);
4340
}

src/test/resources/mappings/gov-pay-card-payment-status-successful.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id" : "f4db6fd2-dea4-4a3a-80df-643b2cf1344d",
2+
"id" : "f4db6fd2-dea4-4a3a-80df-643b2cf1344e",
33
"name" : "card-payments_rc-1701-0909-0602-0418",
44
"request" : {
55
"url" : "/card-payments/RC-1701-0909-0602-0418/statuses",
@@ -19,6 +19,6 @@
1919
"Date" : "Mon, 19 Aug 2019 10:09:15 GMT"
2020
}
2121
},
22-
"uuid" : "f4db6fd2-dea4-4a3a-80df-643b2cf1344d",
22+
"uuid" : "f4db6fd2-dea4-4a3a-80df-643b2cf1344e",
2323
"persistent" : true
2424
}

src/test/resources/mappings/gov-pay-create-card-payment-successful.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "603a01d7-0c0b-494d-ba4c-0d7165238522",
2+
"id": "703a01d7-0c0b-494d-ba4c-0d7165238522",
33
"name": "gov-pay-card-payments",
44
"request": {
55
"url": "/service-request/2023-1701090705688/card-payments",
@@ -26,6 +26,6 @@
2626
"Date": "Mon, 19 Aug 2019 09:46:54 GMT"
2727
}
2828
},
29-
"uuid": "603a01d7-0c0b-494d-ba4c-0d7165238522",
29+
"uuid": "703a01d7-0c0b-494d-ba4c-0d7165238522",
3030
"persistent": true
3131
}

0 commit comments

Comments
 (0)