从数据库获取数据并使用映射(orika)时出错-ma.glasnost.orika.MappingException

时间:2019-09-30 11:00:13

标签: database spring-boot jpa mapper orika

ma.glasnost.orika.MappingException:遇到枚举到对象的映射(反之亦然)

  

ma.glasnost.orika.MappingException:遇到枚举到对象的映射(反之亦然); sourceType = AccountPlan,destinationType = Plan       在ma.glasnost.orika.impl.generator.specification.UnmappableEnum.generateMappingCode(UnmappableEnum.java:41)〜[orika-core-1.5.0.jar:na]       在ma.glasnost.orika.impl.generator.SourceCodeContext.mapFields(SourceCodeContext.java:778)〜[orika-core-1.5.0.jar:na]

           return accountRepository.findById(id)
               .map(account -> mapper.map(account, AccountDetail.class))
               .orElseThrow(() -> new ResourceNotFound("Account not found Id: " + id));

0 个答案:

没有答案