kora-mapstructlisted
Install: claude install-skill kora-projects/kora-skills
# kora-mapstruct — MapStruct mappers as Kora components
> **Kora sub-skill — obey the [kora-v1 meta rules](../../SKILL.md) on every task:** **R0** ensure `.kora-agent/` docs+examples are cloned · **R1** read this sub-skill before writing code · **R2** Kora APIs only — no Spring/Micronaut/Quarkus, no invented annotations or config keys · **R3** journal any incorrect Kora usage. Add comments/Javadoc only if asked.
MapStruct generates the mapper implementation at compile time. Kora's MapStruct
extension detects every `@Mapper` interface, finds the generated `*MapperImpl`,
and registers it as a singleton component in the DI graph. You inject the mapper
interface by constructor like any other component — **no `@Module` to plug in and
no `@Component` on the mapper**.
All Kora artifacts inherit their version from the `kora-parent` BOM
(`ru.tinkoff.kora:kora-parent:1.2.19` in the example repo) — never version
individual `ru.tinkoff.kora:*` dependencies. MapStruct artifacts are versioned
explicitly (`1.5.5.Final`).
## Quick Start (Java)
`build.gradle`:
```groovy
dependencies {
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.19")
// Kora annotation processor (mandatory)
annotationProcessor "ru.tinkoff.kora:annotation-processors"
// MapStruct processor — generates the *MapperImpl classes
annotationProcessor "org.mapstruct:mapstruct-processor:1.5.5.Final"
// MapStruct runtime
implementation "org.mapstruct:mapstruct:1.5.5.Final"
}
```
`PetMapper.java`