将springboot升级到3.2.0时,出现错误
SpelEvaluationException: EL1005E: Type cannot be found
。
以前的 springboot 版本就发生过这种情况,但已修复。
但是最近springboot 3.2.0发布的时候,又出现了这种情况
我收到此错误:
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1005E: Type cannot be found 'co.lib.util.FaceUtils'
at org.springframework.expression.spel.support.StandardTypeLocator.findType(StandardTypeLocator.java:128)
at org.springframework.expression.spel.ExpressionState.findType(ExpressionState.java:181)
at org.springframework.expression.spel.ast.TypeReference.getValueInternal(TypeReference.java:70)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:61)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:97)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:114)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:273)
at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:167)
基本上,我怀疑它发生在这段代码中:
class FaceState {
@Value("#{T(co.FaceUtils).parseDate('${git.commit.time:}')}")
private CommitDateTime commitTime;
}
有人至少指导我如何解决这个问题吗?..