I am working on Springboot MySQL example(Similar example). In one of the methods, I want to log JSON data but I am getting,
com.example.employee.model.Employee@1595ddd2
@RequestMapping(value="/employees12/{id}", method=RequestMethod.GET)
public Employee getPerson(@PathVariable Long id){
Employee employee = employeeRepository.findOne(id);
//String str=employee.toString();
//System.out.println("string is " + str);
System.out.println(employee); //print json in logs console
return employee;
}
The return employees;
is giving JSON data.
I have tried toString(), even that doesnt work. Any help is appreciated.