第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Failed to load ApplicationContext 一直報錯??

Failed to load ApplicationContext 一直報錯??

qq_指尖旋律_2 2018-01-04 11:34:10
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"? ? ? ?xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ? xmlns:aop="http://www.springframework.org/schema/aop"? ? ? ?xmlns:tx="http://www.springframework.org/schema/tx"? ? ? ?xmlns:context="http://www.springframework.org/schema/context"? ? xsi:schemaLocation="? ? ? ?http://www.springframework.org/schema/beans? http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx? http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/aop? http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context? http://www.springframework.org/schema/context/spring-context.xsd? ? ? ? ">? ?<!-- 加載配置文件 -->? ?<context:property-placeholder location="classpath:jdbc.properties"/>? ?? ?<!-- 配置c3p0連接池 -->? ?<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">? ? ? ?<property name="driverClass" value="${jdbc.driverClass}" />? ? ? ?<property name="jdbcUrl" value="${jdbc.url}" />? ? ? ?<property name="user" value="${jdbc.username}" />? ? ? ?<property name="password" value="${jdbc.password}" />? ?</bean>? ?<!-- 業(yè)務 -->? ?<bean id="accountService" class="cn.itcast.spring.Demo.AccountDaoImpl">? ? ? ?<property name="accountDao" ref="accountDao"></property>? ?</bean>? ?? ?<!-- dao -->? ?<bean id="accountDao" class="cn.itcast.spring.Demo.AccountDaoImpl">? ? ? ?<property name="dataSource" ref="dataSource"></property>? ?</bean>?</beans>package cn.itcast.spring.Demo;import javax.annotation.Resource;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.test.context.ContextConfiguration;import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration("classpath:applicationContext.xml")public class SpringTest { @Resource(name="accountService") private AccountService accountService; @Test public void test1(){ accountService.transfer("aaa", "bbb", 100d); } }
查看完整描述

1 回答

?
慕圣0830664

TA貢獻41條經(jīng)驗 獲得超26個贊

?<!-- 業(yè)務 -->

? ?<bean id="accountService" class="cn.itcast.spring.Demo.AccountDaoImpl">

<!-- dao -->

? ?<bean id="accountDao" class="cn.itcast.spring.Demo.AccountDaoImpl">

@Resource(name="accountService")

private AccountService accountService;

看下這幾句有什么問題沒?已經(jīng)很明顯了,對象的類型不匹配。

查看完整回答
1 反對 回復 2018-01-04
  • 1 回答
  • 0 關注
  • 3238 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號