測試的時候報錯
警告: Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/spring-dao.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found
2019-05-23
+1...求救
2017-11-05
你應(yīng)該是寫錯了,應(yīng)該是<property name="dataSource" ref="dataSource"/>,你檢查檢查是不是寫成了<property name="dataSource" value="dataSource"/>