Files
spring-boot-demo/mapstruct/src/broken/unmapped-target/BrokenMapper.java
T

14 lines
355 B
Java

import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/** The target record has a component (note) that the source does not have. */
@Mapper(unmappedTargetPolicy = ReportingPolicy.ERROR)
public interface BrokenMapper {
record Src(String name, int qty) { }
record Dst(String name, int qty, String note) { }
Dst map(Src src);
}