Skip to content

Commit 85f3ccd

Browse files
authored
bump spring-web to 6.2.12 and fix compatibility with new api (via #1161)
1 parent 1bf17c4 commit 85f3ccd

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

allure-spring-web/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
description = "Allure Spring Web Integration"
22

3-
val springWebVersion = "5.3.37"
3+
val springWebVersion = "6.2.12"
44

55
dependencies {
66
api(project(":allure-attachments"))
@@ -29,3 +29,7 @@ tasks.jar {
2929
tasks.test {
3030
useJUnitPlatform()
3131
}
32+
33+
tasks.compileJava {
34+
options.release.set(17)
35+
}

allure-spring-web/src/main/java/io/qameta/allure/springweb/AllureRestTemplate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public ClientHttpResponse intercept(@NonNull final HttpRequest request, final by
8181

8282
final HttpRequestAttachment.Builder requestAttachmentBuilder = HttpRequestAttachment.Builder
8383
.create("Request", request.getURI().toString())
84-
.setMethod(request.getMethodValue())
84+
.setMethod(request.getMethod().name())
8585
.setHeaders(toMapConverter(request.getHeaders()));
8686
if (body.length != 0) {
8787
requestAttachmentBuilder.setBody(new String(body, StandardCharsets.UTF_8));
@@ -94,7 +94,7 @@ public ClientHttpResponse intercept(@NonNull final HttpRequest request, final by
9494

9595
final HttpResponseAttachment responseAttachment = HttpResponseAttachment.Builder
9696
.create("Response")
97-
.setResponseCode(clientHttpResponse.getRawStatusCode())
97+
.setResponseCode(clientHttpResponse.getStatusCode().value())
9898
.setHeaders(toMapConverter(clientHttpResponse.getHeaders()))
9999
.setBody(StreamUtils.copyToString(clientHttpResponse.getBody(), StandardCharsets.UTF_8))
100100
.build();

0 commit comments

Comments
 (0)