doMain实体少写 get方法报错解决

org.springframework.beans:BeanUtils.copyProperties() 需要参数实体中有get方法

否则会报错:

Aug 24 10:55:54 quotation quotation-10.122.48.186:8080:  ERROR - org.zalando.problem.spring.common.AdviceTraits : Internal Server Error
org.springframework.beans.NotReadablePropertyException: Invalid property 'autoRenew' of bean class [com.lenovo.quotation.domain.QuoteLine]: Bean property 'autoRenew' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
	at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:622)
	at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:612)
	at com.lenovo.quotation.service.utils.CommonUtils.getNullPropertyNames(CommonUtils.java:18)
	at com.lenovo.quotation.service.QuoteLineService.lambda$saveQuoteLineList$1(QuoteLineService.java:84)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
posted @ 2019-08-24 11:34  叶落无蝉鸣  阅读(73)  评论(0编辑  收藏  举报