Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.liuyang.JDbCTemplate.PersonDao]: No default constructor fo

错误是说我的配置文件中没有对构造函数进行配置,所以找不到构造函数,在配置文件application.xml中加入如下句子:

         <bean id="personDao" class="com.liuyang.JDbCTemplate.PersonDao">

                          <constructor-arg index="0" ref="dataSource"></constructor-arg>

          </bean>

绿字部分是重点!!!

posted @ 2016-11-10 15:35  北极的大企鹅  阅读(1723)  评论(0编辑  收藏  举报
阅读 - 79万