When I try to post new object with post method. RequestBody could not recognize contentType. Spring is already configured and POST could work with others objects, but not th
So I had a similar issue where I had a bean with some overloaded constructor. This bean also had Optional properties.
To resolve that I just removed the overloaded constructors and it worked.
example:
public class Bean{
Optional string;
Optional object;
public Bean(Optional str, Optional obj){
string = str;
object = obj;
}
///The problem was below constructor
public Bean(Optional str){
string = str;
object = Optional.empty();
}
}
}