Enum does not have an accessible constructor

Problem: Mapstruct mapper returns next error:

Enum does not have an accessible constructor

Solution: Maybe there is some data that depends on other mapper, if it is the case, just include ‘uses’ parameter in the Mapper annotation.

@Mapper(componentModel= "spring", uses= DependingMapperName.class)

For more interesting tutorials & guides just check them HERE.

Leave a Reply

Your email address will not be published. Required fields are marked *