测试的时候报错

来源:4-7 mybatis整合Spring编码

慕UI6755243

2017-11-04 23:41

警告: 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

写回答 关注

2回答

  • weixin_慕标9025388
    2019-05-23 12:15:59

    +1...求救

  • hermi0ne
    2017-11-05 10:18:35

    你应该是写错了,应该是<property name="dataSource" ref="dataSource"/>,你检查检查是不是写成了<property name="dataSource" value="dataSource"/>

    qq_L_5...

    我也报这个错.<property name="dataSource" ref="dataSource"/>没写错啊

    2018-06-24 17:33:46

    共 1 条回复 >

Java高并发秒杀API之业务分析与DAO层

Java实现高并发秒杀API的第一门课,还等什么,赶快来加入吧

87424 学习 · 496 问题

查看课程

相似问题