Skip to content

Commit 114ae25

Browse files
committed
dev: post bodyValue setting
1 parent de6b204 commit 114ae25

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bm-controller/src/main/java/org/benchmarker/bmcontroller/preftest/controller/PerftestController.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import org.benchmarker.bmcontroller.common.controller.annotation.GlobalControllerModel;
88
import org.benchmarker.bmcontroller.user.service.UserContext;
99
import org.springframework.core.ParameterizedTypeReference;
10-
import org.springframework.http.MediaType;
1110
import org.springframework.http.ResponseEntity;
1211
import org.springframework.http.codec.ServerSentEvent;
1312
import org.springframework.messaging.simp.SimpMessagingTemplate;
@@ -54,12 +53,11 @@ public ResponseEntity send(@PathVariable("group_id") String groupId,
5453

5554
WebClient webClient = WebClient.create(agentUrl);
5655
// TODO : template 정보를 조회해서 전송해야합니다.
57-
TemplateInfo templateInfo = new TemplateInfo();
56+
TemplateInfo templateInfo = new TemplateInfo().random();
5857

5958
Flux<ServerSentEvent<TestResult>> eventStream = webClient.post()
60-
.uri("/api/templates/{template_id}?action={action}", templateId, action)
61-
.contentType(MediaType.APPLICATION_JSON)
62-
.body(templateInfo, TemplateInfo.class)
59+
.uri("/api/templates/{templateId}?action={action}", templateId, action)
60+
.bodyValue(templateInfo)
6361
.retrieve()
6462
.bodyToFlux(typeReference)
6563
.log();

0 commit comments

Comments
 (0)