'Blaze persistence UpdatableEntityView as spring boot request body

I am trying to use blaze persistence UpdatableEntityView as the request body with spring boot. Following is the code for UpdatableEntityView

@UpdatableEntityView
@EntityView(DealListing.class)
public interface DealListingUpdateView {
    @IdMapping
    Long getId();
    void setId(Long id);

    Instant getListedOn();
    void setListedOn(Instant listedOn);
}

Following is the rest controller mapping

@PutMapping("/deal-listings/sell/{id}")
    public void test(@PathVariable Long id, @RequestBody DealListingUpdateView dealListingUpdateView){
        dealListingService.testUpdate(id, dealListingUpdateView);
}

Following is the pom.xml dependency to do the deserialization as specified in the blaze persistence document

        <dependency>
            <groupId>com.blazebit</groupId>
            <artifactId>blaze-persistence-integration-jackson</artifactId>
            <scope>compile</scope>
        </dependency>

But when i submit the request i am getting the following error

Type definition error: [simple type, class com.ilex.tradeservice.domain.view.blaze.DealListingUpdateView]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.ilex.tradeservice.domain.view.blaze.DealListingUpdateView` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: (PushbackInputStream); line: 1, column: 1]



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source