mapstruct-patterns

Community

Constructor-based MapStruct mappings for safety.

Authorcooker
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Constructor-based mapping enforces compile-time safety in MapStruct-powered DTO and entity mappings, catching constructor changes during build rather than at runtime.

Core Features & Use Cases

  • Enforces constructor-based mapping so changes to constructors cause compile-time errors, ensuring mapper correctness.
  • Supports CDI-based MapStruct integration and the custom @Default annotation to resolve multiple constructors safely.
  • Ideal for Jakarta EE projects where DTOs, entities, and records must map deterministically with strong type safety.

Quick Start

Configure your mapper with CDI and annotate the selected constructor with a Default-like annotation to enable compile-time safety.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: mapstruct-patterns
Download link: https://github.com/cooker/wx-apartment-ledger/archive/main.zip#mapstruct-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.