I am using jackson databind
getting error saying no default constructor
data class TestKtC (val id:Int, val name:String)
@RequestMapping(method =
RequestMethod.POST, value = "/sign_up")
public ResponseEntity<?> sign_up(@RequestBody TestKtC signUpRequest) {
return ResponseEntity.ok(signUpRequest);
}
how to fix this? found one solution where I have to create constructor and late init var. How can i do this keeping the data class unchanged???