MessageDto instead of String in Event history

This commit is contained in:
Szakalakamaka
2020-11-19 10:14:51 +01:00
parent 56baf9641e
commit 52893c2888
18 changed files with 84 additions and 74 deletions

View File

@@ -14,7 +14,6 @@ import javax.validation.Valid;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
@@ -27,7 +26,6 @@ public class EventController {
private final EtrackService etrackService;
private final List<Event> eventList = new LinkedList<>();
private final List<String> messageDtoList = new ArrayList<>();
@GetMapping("/etrack/{uuid}")
public String showEtrack(@Valid EventRequestDto eventRequestDto, @PathVariable UUID uuid, final Model model,
@@ -49,11 +47,8 @@ public class EventController {
if (updateList){
eventList.clear();
eventList.addAll(etrackService.getEventsByDateTimeAndBusinessKeys(eventRequestDto));
eventList.forEach(event -> messageDtoList.add(String.valueOf(event.getMessage())));
}
model.addAttribute("eventList", eventList);
model.addAttribute("messageDtoList", messageDtoList);
}
@ModelAttribute("eventRequestDto")

View File

@@ -55,15 +55,20 @@ public class KlausController {
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "getMockedResponse - request",
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseId)));
// MockedMessageDto.builder()
// .httpHeaders(requestEntity.getHeaders().toSingleValueMap())
// .httpStatus(requestEntity.)
// .messageBody()
// .mediaType()
// .mockedResponseId(mockedResponseId)
// .clientUUID(clientUUID)
// .build();
// log.info(objectMapper.writeValueAsString(mockedMessageDto));
String s = requestEntity.toString();
String s2 = String.valueOf(requestEntity).replaceAll("\"", "\\\\\"");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:\"gzip,deflate\", host:\"localhost:8098\", connection:\"Keep-Alive\", user-agent:\"Apache-HttpClient/4.5.5 (Java/12.0.1)\"]>");
log.info(requestEntity.toString().replaceAll("\"", "\\\\\""));
// log.info(requestEntity.toString().replaceAll("\"", "\\\\\""));
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "getMockedResponse - response",
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseId)));