Cześć.
Mam coś takiego:
@RequestMapping(value = "/currency/{code}", method = RequestMethod.POST)
public String currencyResult(@ModelAttribute Currency currency, Model model, @PathVariable String code)
{
Table table = restTemplate.getForObject("http://api.nbp.pl/api/exchangerates/rates/A/" + code, Table.class);
model.addAttribute("table", table);
return "result";
}
<form action="#" th:action="@{/currency/}" th:object="${currency}" method="post">
<p>Podaj kod waluty: <input type="text" th:field="*{code}"/></p>
<input type="submit" value="Submit"/>
</form>
i chciałbym, żeby to co jest dodawane w tym inpucie do th:field="*{code}" było też doklejane th:action="@{/currency/TUTAJ}". Jak to zrobić?