Skip to content

Commit

Permalink
Avoid warnings about unmapped target
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-punko committed Jun 8, 2024
1 parent 33dee76 commit 9034aa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/java/by/andd3dfx/mappers/ArticleMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;

@Mapper(componentModel = "spring", nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
@Mapper(componentModel = "spring",
unmappedTargetPolicy = ReportingPolicy.IGNORE,
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface ArticleMapper {

ArticleDto toArticleDto(Article article);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/by/andd3dfx/mappers/AuthorMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
import java.util.List;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;

@Mapper(componentModel = "spring", nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
@Mapper(componentModel = "spring",
unmappedTargetPolicy = ReportingPolicy.IGNORE,
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface AuthorMapper {

AuthorDto toAuthorDto(Author author);
Expand Down

0 comments on commit 9034aa9

Please sign in to comment.