出现这个东西的原因就是使用@Value
设置的值出错了。
比如
@Value("#{${gift.plan.code.list2}}")
private List<String> giftPlanCodeList2;
报错为
Unsatisfied dependency expressed through field ‘giftPlanCodeList2’; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelParseException: EL1041E: After parsing a valid expression, there is still more data in the expression: ‘comma(,)’
那就去看配置的值为
gift.plan.code.list = "APCIP3,APCIP2,APCIP1"
gift.plan.code.list2 = APCIP3,APCIP2,APCIP1
list2没有双引号,这种配置就是错的。应该加上双引号,能正确的配置值。
多看报错信息,总会找到原因的。
【完】
正在去BAT的路上修行
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)