Spring中的Error

来源:互联网 发布:caffe和tensorflow 编辑:程序博客网 时间:2024/05/22 13:50

1 未写 set 方法   初始化bean的错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService' defined in class path resource [cn/itcast/spring0401/jdbc/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.springframework.jdbc.core.simple.SimpleJdbcTemplate] to required type [org.springframework.jdbc.core.simple.SimpleJdbcOperations] for property 'jdbc'; nested exception is java.lang.IllegalArgumentException: Original must not be null
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)

Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.springframework.jdbc.core.simple.SimpleJdbcTemplate] to required type [org.springframework.jdbc.core.simple.SimpleJdbcOperations] for property 'jdbc'; nested exception is java.lang.IllegalArgumentException: Original must not be null

Caused by: java.lang.IllegalArgumentException: Original must not be null