fix for history and allMessages table

This commit is contained in:
Szakalakamaka
2020-09-09 11:04:58 +02:00
parent 87eb042008
commit 34953ed003
44 changed files with 805 additions and 380 deletions

View File

@@ -1,12 +1,14 @@
package com.release11.klaus.controller;
import com.release11.klaus.model.MockedMessageDto;
import com.release11.klaus.utilis.BusinessKey;
import com.release11.klaus.utilis.TrackingClient;
import com.release11.klaus.model.MockedResponseDto;
import com.release11.klaus.model.MockedMessage;
import com.release11.klaus.service.KlausService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.RequestEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@@ -25,6 +28,15 @@ public class KlausController {
private final KlausService klausService;
@RequestMapping(value = "klaus/v1/getAll/{clientUUID}")
public ResponseEntity<String> getAllMockedResponses(@PathVariable UUID clientUUID){
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "getMockedResponse",
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
BusinessKey.MESSAGE_ID, "all"));
List<MockedMessageDto> mockedMessages = klausService.getAllMockedResponses(clientUUID);
return new ResponseEntity<>(mockedMessages.toString(), HttpStatus.OK);
}
@RequestMapping(value = "klaus/v1/get/{clientUUID}/{mockedResponseId}")
public ResponseEntity getMockedResponse(@PathVariable UUID clientUUID,
@PathVariable int mockedResponseId){
@@ -44,10 +56,10 @@ public class KlausController {
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseId)));
MockedResponseDto mockedResponseDto = new MockedResponseDto(clientUUID, mockedResponseId,
MockedMessageDto mockedMessageDto = new MockedMessageDto(clientUUID, mockedResponseId,
requestEntity.getHeaders().getContentType().toString(), requestEntity.getBody(),
requestEntity.getHeaders().toSingleValueMap(), httpStatus);
return klausService.setMockedResponse(mockedResponseDto);
return klausService.setMockedResponse(mockedMessageDto);
}
}

View File

@@ -1,25 +1,25 @@
package com.release11.klaus.controller;
import com.release11.klaus.model.EventRequestDto;
import com.release11.klaus.model.MockedMessageDto;
import com.release11.klaus.service.KlausService;
import com.release11.klaus.utilis.BusinessKey;
import com.release11.klaus.utilis.TrackingClient;
import com.release11.klaus.model.MockedResponseDto;
import com.release11.klaus.service.KlausService;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.*;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.net.InetAddress;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.*;
@Slf4j
@Controller
@@ -28,66 +28,78 @@ import java.util.UUID;
public class KlausMvcController {
private final KlausService klausService;
@GetMapping("/login")
public String login() {
return "login";
}
@GetMapping("/home")
public String showHome(Model model, @RequestParam UUID clientUUID) {
model.addAttribute("mockedResponseDto", new MockedResponseDto(clientUUID, 1,
"application/xml", "body", new HashMap<>(), 200));
@GetMapping({"/home", "/home/{uuid}"})
public String showHome(final MockedMessageDto mockedMessageDto, Model model,
@RequestParam(required = false) UUID clientUUID,
@PathVariable(required = false) UUID uuid) {
if (uuid != null) clientUUID = uuid;
if (clientUUID != null) mockedMessageDto.setClientUUID(clientUUID);
model.addAttribute("mockedMessageDtoList", klausService.getAllMockedResponses(clientUUID));
return "index";
}
//TODO refactor
@PostMapping("/home")
public String showHomePost(@Valid MockedResponseDto mockRsp, BindingResult bindingResult, Model model,
@RequestParam(required = false) String[] header,
@RequestParam(required = false) String[] value) throws Exception {
if (bindingResult.hasErrors()) {
return "index";
}
@PostMapping("/home/{clientUUID}")
public String showHomePost(@Valid final MockedMessageDto mockedMessageDto, BindingResult bindingResult,
final Model model) {
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "setMockedResponse",
BusinessKey.CLIENT_UUID, String.valueOf(mockRsp.getClientUUID()),
BusinessKey.MESSAGE_ID, String.valueOf(mockRsp.getMockedResponseId())));
log.info(mockRsp.toString());
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.valueOf(mockRsp.getMediaType()));
if (header!=null){
for (int i = 0; i < header.length; i++) {
httpHeaders.set(header[i], value[i]);
}}
MockedResponseDto mockedResponseDto = new MockedResponseDto(mockRsp.getClientUUID(), mockRsp.getMockedResponseId(),
mockRsp.getMediaType(), mockRsp.getMessageBody(), httpHeaders.toSingleValueMap(), mockRsp.getHttpStatus());
klausService.setMockedResponse(mockedResponseDto);
BusinessKey.CLIENT_UUID, String.valueOf(mockedMessageDto.getClientUUID()),
BusinessKey.MESSAGE_ID, String.valueOf(mockedMessageDto.getMockedResponseId())));
klausService.setMockedResponse(mockedMessageDto);
model.addAttribute("mockedMessageDtoList", klausService.getAllMockedResponses(mockedMessageDto.getClientUUID()));
model.addAttribute("mockSaved", "true");
return "index";
}
@GetMapping("/home/getMockedResponse")
@ResponseBody
public String showGetMockedResponse(MockedResponseDto mockedResponseDto) {
public String showGetMockedResponse(final MockedMessageDto mockedMessageDto) {
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "getMockedResponse",
BusinessKey.CLIENT_UUID, String.valueOf(mockedResponseDto.getClientUUID()),
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseDto.getMockedResponseId())));
return klausService.getMockedResponse(mockedResponseDto.getClientUUID(),
mockedResponseDto.getMockedResponseId()).toString();
BusinessKey.CLIENT_UUID, String.valueOf(mockedMessageDto.getClientUUID()),
BusinessKey.MESSAGE_ID, String.valueOf(mockedMessageDto.getMockedResponseId())));
return klausService.getMockedResponse(mockedMessageDto.getClientUUID(),
mockedMessageDto.getMockedResponseId()).toString();
}
private void setHeaders(MockedResponseDto mockedResponseDto, String[] header, String[] value){
@RequestMapping(value = "/home/{clientUUID}", params = {"addHeader"})
public String addRow(final MockedMessageDto mockedMessageDto, @RequestParam String headerKey,
@RequestParam String headerValue) {
mockedMessageDto.getHttpHeaders().put(headerKey, headerValue);
return "index";
}
@RequestMapping(value="/home/{clientUUID}", params={"removeHeader"})
public String removeHeader(final MockedMessageDto mockedMessageDto, final HttpServletRequest req) {
mockedMessageDto.getHttpHeaders().remove(req.getParameter("removeHeader"));
System.out.println(mockedMessageDto);
return "index";
}
@SneakyThrows
@ModelAttribute("localhost")
public String localhost() {
return InetAddress.getLocalHost().getHostName();
}
@ModelAttribute("clientUUID")
public UUID clientUUID(){
public UUID clientUUID() {
return UUID.randomUUID();
}
@ModelAttribute("mockedMessageDto")
public MockedMessageDto mockedMessageDto() {
return new MockedMessageDto(UUID.randomUUID(), 1,
"application/xml", "body", new LinkedHashMap<>(), 200);
}
@ModelAttribute("eventsDto")
public EventRequestDto eventsDto(){
public EventRequestDto eventsDto() {
return EventRequestDto.builder()
.localDateTimeFrom(LocalDateTime.of(LocalDate.now(), LocalTime.MIN))
.localDateTimeTo(LocalDateTime.of(LocalDate.now().plusDays(1), LocalTime.MIDNIGHT))

View File

@@ -1,20 +1,12 @@
package com.release11.klaus.model;
import com.release11.klaus.utilis.BusinessKey;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.lang.Nullable;
import javax.persistence.Entity;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Data
@Entity
@Builder
@ToString
@NoArgsConstructor

View File

@@ -63,7 +63,6 @@ public class EventRepositoryImpl implements EventRepository {
try {
events.add(objectMapper.readValue(eventString, Event.class));
} catch (JsonProcessingException e) {
System.out.println(e);
e.printStackTrace();
}
}

View File

@@ -1,13 +1,15 @@
package com.release11.klaus.repository;
import com.release11.klaus.model.MockedResponseDto;
import com.release11.klaus.model.MockedMessage;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.UUID;
@Repository
@Transactional
public interface MockedResponseRepository extends CrudRepository<MockedResponseDto, String>{
public interface MockedResponseRepository extends CrudRepository<MockedMessage, String> {
List<MockedMessage> findAllByClientUUID(UUID clientUUID);
}

View File

@@ -1,15 +1,16 @@
package com.release11.klaus.service;
import com.release11.klaus.model.MockedResponseDto;
import org.springframework.http.HttpStatus;
import org.springframework.http.RequestEntity;
import com.release11.klaus.model.MockedMessageDto;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.UUID;
@Service
public interface KlausService {
void deleteMockedResponse(UUID clientUUID, int mockedResponseId);
List<MockedMessageDto> getAllMockedResponses(UUID clientUUID);
ResponseEntity<String> getMockedResponse(UUID clientUUID, int mockedResponseId);
ResponseEntity<String> setMockedResponse(MockedResponseDto mockedResponseDto);
ResponseEntity<String> setMockedResponse(MockedMessageDto mockedMessageDto);
}

View File

@@ -1,6 +1,9 @@
package com.release11.klaus.service;
import com.release11.klaus.model.MockedResponseDto;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.release11.klaus.mappers.MockedMessageMapper;
import com.release11.klaus.model.MockedMessage;
import com.release11.klaus.model.MockedMessageDto;
import com.release11.klaus.repository.MockedResponseRepository;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -9,35 +12,48 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
import java.util.stream.Collectors;
@Slf4j
@Service
@AllArgsConstructor
public class KlausServiceImpl implements KlausService {
private final ObjectMapper objectMapper;
private final MockedMessageMapper mockedMessageMapper;
private final MockedResponseRepository mockedResponseRepository;
@Override
public void deleteMockedResponse(UUID clientUUID, int mockedResponseId) {
}
@Override
public List<MockedMessageDto> getAllMockedResponses(UUID clientUUID) {
return mockedResponseRepository.findAllByClientUUID(clientUUID).stream()
.map(mockedMessageMapper::mockedMessageToMockedMessageDto)
.collect(Collectors.toList());
}
@Override
public ResponseEntity<String> getMockedResponse(UUID clientUUID, int mockedResponseId) {
log.info("KlausServiceImpl, operation getMockedResponse, clientId {}, mockedResponseId {} ",
clientUUID, mockedResponseId);
String key = clientUUID.toString() + "_" + mockedResponseId;
Optional<MockedResponseDto> optMockedResponseDto = mockedResponseRepository.findById(key);
MockedResponseDto mockedResponseDto = optMockedResponseDto.get();
MockedMessage mockedMessage = mockedResponseRepository.findById(key).get();
HttpHeaders httpHeaders = new HttpHeaders();
mockedResponseDto.getHttpHeaders().forEach(httpHeaders::set);
return new ResponseEntity<>(mockedResponseDto.getMessageBody(), httpHeaders,
Objects.requireNonNull(HttpStatus.valueOf(mockedResponseDto.getHttpStatus())));
if(mockedMessage.getHttpHeaders() !=null)mockedMessage.getHttpHeaders().forEach(httpHeaders::set);
return new ResponseEntity<>(mockedMessage.getMessageBody(), httpHeaders,
Objects.requireNonNull(HttpStatus.valueOf(mockedMessage.getHttpStatus())));
}
@Override
public ResponseEntity<String> setMockedResponse(MockedResponseDto mockedResponseDto) {
mockedResponseRepository.save(mockedResponseDto);
log.info("KlausServiceImpl, operation setMockedResponse, mockedResponseDto {} ", mockedResponseDto.toString());
public ResponseEntity<String> setMockedResponse(MockedMessageDto mockedMessageDto) {
mockedResponseRepository.save(mockedMessageMapper.mockedMessageDtoToMockedMessage(mockedMessageDto));
log.info("KlausServiceImpl, operation setMockedResponse, mockedMessage {} ", mockedMessageDto.toString());
return new ResponseEntity<>("MockedResponse has been setup successfully!", new HttpHeaders(),
HttpStatus.ACCEPTED);
}

View File

@@ -3,7 +3,7 @@
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<!--https://github.com/kmtong/logback-redis-appender-->
<appender name="LOGSTASH" class="com.release11.klaus.utilis.RedisAppender">
<host>localhost</host>
<host>redis-image</host>
<port>6379</port>
<key>logstash</key>
<layout class="ch.qos.logback.classic.PatternLayout">

View File

@@ -1,3 +1,4 @@
.page-section{
padding: 2rem 0;
}
@@ -11,4 +12,56 @@
content: "";
display: table;
clear: both;
}
}
@media screen and (max-width: 600px) {
.column {
width: 100%;
}
}
button:hover { font-weight: 600; }
button:hover i { margin-right: 20px; }
button:focus {
outline: none;
}
.pageable {
border: 1px solid rgba(0, 0, 0, .11);
;
padding: 10px;
}
.tr-pageable{
margin-left:1000px;
}
.controls-item {
display: inline-block;
}
.btn {
margin: 1px;
}
button[name="allMessagesClicked"] {
color: #00b3b3;
}
#pagination-wrapper button {
background: none;
border: 2px solid #00b3b3;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
}
button[name="removeHeader"] {
position: absolute;
background: none;
border: none;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
}

View File

@@ -2,51 +2,64 @@
<html lang="en" xmlns:th="http://thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="/js/main.js">
document.getElementById('localDateTimeFrom').valueAsDate = new Date();
</script>
<link href="css/styles.css" rel="stylesheet" />
<title>R11 Klaus</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Lato:100,300,600" rel="stylesheet" type="text/css">
<link href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css">
<link href="/css/styles.css" rel="stylesheet"/>
</head>
<body>
<hr>
<div><br>In order to set mockup response. Please send the response, that you want to receive, on:
<br>http://localhost:8097/klaus/v1/set/ <a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}?httpStatus=200
<div><br>In order to set mockup response please fill the form below:
</div>
<section class="page-section" id="main-section">
<section class="page-section" id="main-section" >
<div class="container">
<div class="row">
<div class="column">
<br>You can also simply fill and submit the below form:
<form action="#" th:action="@{/home}" th:object="${mockedResponseDto}" method="post">
<div class="column" >
<br>You can also simply fill and submit the below form:
<form action="#" th:action="@{/home/__${mockedMessageDto.clientUUID}__}"
th:object="${mockedMessageDto}" method="post">
<table>
<input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/>
<tr>
<td>Mocked response id:</td>
<td><input type="text" th:field="*{mockedResponseId}"/></td>
<td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">Id Error</td>
<td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">Id
Error
</td>
</tr>
<tr>
<td>Mocked response body:</td>
<td><textarea rows="4" cols="50" th:field="*{messageBody}"></textarea></td>
<td><textarea rows="4" cols="30" th:field="*{messageBody}"></textarea></td>
<td th:if="${#fields.hasErrors('messageBody')}" th:errors="*{messageBody}">Body Error</td>
</tr>
<tr>
<td>Mocked response http code status:</td>
<td><input type="text" th:field="*{httpStatus}"></td>
<td th:if="${#fields.hasErrors('httpStatus')}" th:errors="*{httpStatus}">HttpStatus Error</td>
<td th:if="${#fields.hasErrors('httpStatus')}" th:errors="*{httpStatus}">HttpStatus Error
</td>
</tr>
<tr>
<td>Header name</td>
<td>Header value</td>
</tr>
<tr>
<td>Provide mocked response headers:</td>
<td><a href="#" id="addHeader" onclick="addFields()">Add a new header</a>
<table>
<tr>
<td><div id="headers"></div></td>
</tr>
</table>
<td><input type="text" name="headerKey" id="headerKey" placeholder="myHeaderKey"/></td>
<td>
<input type="text" name="headerValue" id="headerValue" placeholder="myHeaderValue"/>
<input type="image" name="addHeader" src="/img/icons8-plus-48.png"
style="width: 20px;"/>
</td>
</tr>
<tr th:each="entry, stats : *{httpHeaders}" bgcolor="#b3ffff">
<td><input type="text" name="value" th:value="${entry.key}" disabled="disabled"/></td>
<td>
<input type="text" name="value" th:field="*{httpHeaders[__${entry.key}__]}"/>
<button type="submit" name="removeHeader" th:value="${entry.key}" >
<img src="/img/icons8-cancel-64.png" style="width: 20px;"/>
</button>
</td>
</tr>
<tr>
@@ -68,7 +81,8 @@
<p th:if="${mockSaved}">Mock has been saved</p>
</td>
<td>
<form action="#" th:action="@{/home/getMockedResponse}" th:object="${mockedResponseDto}" method="get">
<form action="#" th:action="@{/home/getMockedResponse}" th:object="${mockedMessageDto}"
method="get">
<input type="text" th:field="*{clientUUID}" hidden/>
<input type="text" th:field="*{mockedResponseId}" hidden/>
<p th:if="${mockSaved}"><input type="submit" value="Test your mock"/></p>
@@ -78,43 +92,70 @@
</table>
</div>
<div class="column">
Your mocked requests:
<br>
larum ispum srutum tutum
<table>
<thead>
<tr>
<th class="tr-pageable">#</th>
<th class="tr-pageable">MessageId</th>
<th class="tr-pageable">Media Type</th>
<th class="tr-pageable">Http Status</th>
</tr>
</thead>
<tbody id="table-body">
</tbody>
</table>
</div>
<div class="container ">
<div id="pagination-wrapper"></div>
</div>
</div>
</div>
</div>
</section>
<hr>
<div>
<br>In order to use the mocked response in your integration tests or simply
get your mocked response please send a request to
<br>http://localhost:8097/klaus/v1/get/<a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}
<br>You will receive the same body and headers as you sent them in the step 1.
</div>
<hr>
<div>
<br>To see your activity history use the form below
<form action="#" th:action="@{/eventsForm}" th:object="${eventsDto}" method="post">
<input type="text" th:name="clientUUID" th:value="${mockedResponseDto.clientUUID}" hidden/>
<br><label>Date from:</label><br>
<input type="datetime-local" th:field="*{localDateTimeFrom}"/>
<td th:if="${#fields.hasErrors('localDateTimeFrom')}" th:errors="*{localDateTimeFrom}">localDateTimeFrom Error</td>
<br><label>Date to:</label><br>
<input type="datetime-local" th:field="*{localDateTimeTo}"/>
<td th:if="${#fields.hasErrors('localDateTimeTo')}" th:errors="*{localDateTimeTo}">localDateTimeTo Error</td>
<div th:if="${#fields.hasAnyErrors()}">
<p th:each="err : ${#fields.allErrors()}" th:text="${err}">...</p>
</div>
<input type="submit" value="See my history"/>
</form>
</div>
<hr>
</div>
<hr>
</div>
<hr>
<div>
<br>In order to set or get responses through curl or http tools you can use urls below.
<br>When you set your response simply set headers and media type of your request that you expect to get in the
response from the next step.
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/set/ <a
th:text="${mockedMessageDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}?httpStatus={httpStatus}
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/get/<a
th:text="${mockedMessageDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/getAll/<a
th:text="${mockedMessageDto.clientUUID}">clientUUID should be here</a>
</div>
<hr>
<div>
<br>To see your activity history use the form below
<form action="#" th:action="@{/eventsForm}" th:object="${eventsDto}" method="post">
<input type="text" th:name="clientUUID" th:value="${mockedMessageDto.clientUUID}" hidden/>
<br><label>Date from:</label><br>
<input type="datetime-local" th:field="*{localDateTimeFrom}"/>
<td th:if="${#fields.hasErrors('localDateTimeFrom')}" th:errors="*{localDateTimeFrom}">localDateTimeFrom Error
</td>
<br><label>Date to:</label><br>
<input type="datetime-local" th:field="*{localDateTimeTo}"/>
<td th:if="${#fields.hasErrors('localDateTimeTo')}" th:errors="*{localDateTimeTo}">localDateTimeTo Error</td>
<div th:if="${#fields.hasAnyErrors()}">
<p th:each="err : ${#fields.allErrors()}" th:text="${err}">...</p>
</div>
<input type="submit" value="See my history"/>
</form>
</div>
<hr>
</div>
</div>
<script type="text/javascript" th:inline="javascript">
var mockedMessageDtoList = /*[[${mockedMessageDtoList}]]*/;
</script>
<script src="/js/paggination.js"></script>
</body>
</html>

View File

@@ -3,12 +3,14 @@
<head>
<meta charset="UTF-8">
<title>Login</title>
<script src="/js/main.js"></script>
<script>var mockedMessageDtoList = "[[${mockedMessageDtoList}]]";
console.log(mockedMessageDtoList.mockedResponseId);
console.log(mockedMessageDtoList);</script>
<link href="css/styles.css" rel="stylesheet" />
</head>
<body>
<div><br>Please move to the next step with your own client UUID: </div>
<form action="#" th:action="@{/home}" method="get">
<form action="#" th:action="@{/home/{path}(path=${type})}" method="get">
<br><label >Please provide your client UUID:</label><br/>
<input type="text" name="clientUUID" value="436c4774-038f-4540-9c18-2691ca9b53d4" />
<input type="submit" value="Proceed"/>