I have controller like below
@RequestMapping("/hello")
public void callHello(MyObject myObject) {
//code
}
Here MyObject is a POJO class with getter and setter
public class MyObj {
private String fName;
private String lName;
//getter and setter
}
I am calling this controller via ajax call as
var jqxhr = $.ajax({
url:'hello?fName=testFname&lName=testLname',
type:"GET",
dataType:'JSON'
}});
This is working fine but I am wondering what is the feature of spring that automatically maps url parameter fname and lName and to field of myObject.