You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ControllerLinkBuilder uses some configurable components but they are not exposed for clients. For example, if one is using a domain object in a controller method and wants to generate a URI from the method, they cannot do so. For example:
BookSearch search = new BookSearch("author:johnson genre:technical");
Link link = linkTo(methodOn(BookController.class).fetchBooks(search)).withSelfRel();
The above, without the ability to get into the internal factory of ControllerLinkBuilder and configure a custom UriComponentsContributor, the resulting URI would look like this:
/books
When it is expected to look like this:
/books?search=author:johnson%20genre:technical
I've tried a bunch of techniques to solve this and so far the only solution is very bad: create a bean that will use reflection to get access to the internal factory and register UirComponentsContributors during startup.
The text was updated successfully, but these errors were encountered:
ControllerLinkBuilder
uses some configurable components but they are not exposed for clients. For example, if one is using a domain object in a controller method and wants to generate a URI from the method, they cannot do so. For example:The above, without the ability to get into the internal factory of
ControllerLinkBuilder
and configure a customUriComponentsContributor
, the resulting URI would look like this:When it is expected to look like this:
I've tried a bunch of techniques to solve this and so far the only solution is very bad: create a bean that will use reflection to get access to the internal factory and register
UirComponentsContributor
s during startup.The text was updated successfully, but these errors were encountered: