Is there any special tool in Thymeleaf
to construct URLs by adding/removing/replacing parameters?
For example, I need to make a request to the same page but adding one additional parameter "p=1" into the request. So that:
'/foo?a=b' becomes '/foo?a=b&p=1' // addition
'/foo?p=0' becomes '/foo?p=1' // replacing
@{}
doesn't seem to be helpful here.
I would imagine something like the following to exist:
@{#currentUri(*, p=1, !q)}
, where '*' is for all existing params, 'p=1' means add/replace and '!' means excluding.
Does Thymeleaf
have anything like that or any other syntax for flexible URL construction?