Answer the question
In order to leave comments, you need to log in
Why is mapstruct not always @Autowired field?
@Mapper(componentModel = "spring", uses = Converters.class, injectionStrategy = InjectionStrategy.FIELD)
public interface ObjectInfoMapper {
}
@Mapper(componentModel = "spring", uses = Converters.class, injectionStrategy = InjectionStrategy.FIELD)
public interface ObjectMapper {
}
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2018-10-30T12:17:47+0300",
comments = "version: 1.3.0.Beta1, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
)
@Component
public class ObjectInfoMapperImpl implements ObjectInfoMapper {
@Autowired
private Converters converters; // есть поле
}
/*
Второй
*/
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2018-10-30T12:35:34+0300",
comments = "version: 1.3.0.Beta1, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
)
@Component
public class CvInfoMapperImpl implements ObjectMapper {
// Нет поля @Autowired
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question