REST How to implement polymorphic POST end point: abstract types either need to be mapped to concrete types Exception
问题 I work on a SpringBoot application. I have the following class hierarchy: public abstract class DlqMessage { Long id; UUID employeeId; EventReason reason; } public class ContractUpdateMessage extends DlqMessage {} public class SingleContractUpdateMessage extends DlqMessage { UUID benefitId; UUID employerId; } So, the classes ContractUpdateMessage and SingleContractUpdateMessage only differ by a couple of fields. I Have a REST controller that uses POST to create and save a new entity in the DB