I'm using thymeleaf and spring boot and I want send request parameters to controller method but thymeleaf is also sending empty values, how can I send only parameters that actually have value.
<form class="col s12" th:action="@{/browse}" method="get">
<input id="newStatusName" th:name="status">
<input id="driverName" th:name="driver">
<input id="vehicleName" th:name="vehicle">
<button> Search </button>
</form>
And the thing is when I submit form without writing anything into input i got url:
http://localhost:8090/browse&status=&driver=&vehicle=
and I want normal url if no values are present:
http://localhost:8090/browse