java - Having @ModelAttribute in links when using Spring HATEOAS -
i'm building urls controller methods using tools spring hateoas provides. problem see that, can't generate link necessary request parameters when use @modelattribute aggregate these parameters. use @modelattribute not work lot of request parameters in service:
@getmapping("/entities") public resource<entity> get(@modelattribute criteria criteria) { }
when try build link method, not include accountid have in model attribute. expect have request parameter.
linkto(methodon(mycontroller.class).get(new criteria(accountid)))
is there way add @modelattribute fields request parameters? sent request parameters, expected spring automatically.
Comments
Post a Comment