今天在配置事物的时候出现了,这个错误,
Error creating bean with name 'org.springframework.jdbc.datasource.DataSourceTransactionManager#0' defined in file [F:\TestJingTao\jt-manage\target\classes\spring\application-context.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
解决办法 把value改成ref
<property name="dataSource" value="dataSourceBone"></property>
<property name="dataSource" ref="dataSourceBone"></property>