How to print to console in Spring Boot Web Application
System.out.println(job);
like you have done.
It prints something like yourpackage.Job@2g45e0f9
Try to execute you code using debug mode and see if the post method will be executed as it has to do.
This is in addition to what @robocode posted. Override the toString
method in the Job
class to print the parameters the way you would like to see them.
public class Job{
String p1;
int p2;
.
.
@Override
public String toString(){
return "p1: "+p1+", p2: "+p2;
}
}
Makes it easier to simply sysout your objects.
Job job = new Job();
System.out.println(job);