在运行启动时有下面的错误
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalRequiredAnnotationProcessor': Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException:
Invalid property 'order' of bean class [org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor]: No property 'order' found
Caused by: org.springframework.beans.InvalidPropertyException: Invalid property 'order' of bean class [org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor]: No property 'order' found
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:376)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1105)
在spring 2.0.6包中的RequiredAnnotationBeanPostProcessor这个类没有order属性
这时把spring的包更新成2.5.6的就可以了,看代码,确实有order这个属性
private int order = Ordered.LOWEST_PRECEDENCE - 1;
本文讨论了在使用Spring框架时遇到的错误:org.springframework.beans.factory.BeanCreationException,详细解释了错误产生的原因,并提供了将Spring包更新到最新版本(如从2.0.6升级到2.5.6)的解决方案,以解决初始化失败问题。
1801

被折叠的 条评论
为什么被折叠?



