Попробуйте,
private String firstName;
private String lastName;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@JsonProperty(value="first_name")
public void setFirst_name(String firstName) {
this.firstName = firstName;
}
@JsonProperty(value="last_name")
public void setLast_name(String lastName) {
this.lastName = lastName;
}
контроллер
@RestController
public class JsonController {
@RequestMapping(value="/api", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE )
public List<Map<String, Object>> getEmployeeData(EmployeeBean employeeBean) {
System.out.println("employeeBean: "+employeeBean);
return null;
}
}
результат:
employeeBean: EmployeeBean [firstName=firstName10, lastName=lastName20]
Я проверил, и это сработало