My question is very basic.
I have the following html:
<form action="/login" method="GET">
<div>
Id: <input type="text" name="id" value="id"/>
Name: <input type="text" name="name" value="name"/>
</div>
<button>Login</button>
</form>
And the following @GetMapping method to which I want to connect:
@GetMapping("/login")
public String someLogin(LoginObject obj, HttpServletRequest request) {
//do something
}
LoginObject is composed from two fields: id and name, which I am taking from the UI. How do I convert two strings to my LoginObject and then pass it to the @RestController