Skip to content

Make constructor injection the default #1973

@chrylis

Description

@chrylis

As there is a modern consensus that constructor injection should be preferred to field injection, I suggest making the injection strategy default to CONSTRUCTOR. I'm aware that this might be considered a breaking change and a candidate for 2.0, but since MapStruct is based around interface definitions it might conceivably make sense in 1.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions