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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

我有個(gè)問題??????

package?main.java.com.xiaodao.bean;
public?class?BeanScope?{
public?void?say(){
System.out.println("BeanScope?say:"?+this.hashCode());
}
}
<?xml?version="1.0"?encoding="UTF-8"??>
<beans?xmlns="http://www.springframework.org/schema/beans"
????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
????xsi:schemaLocation="http://www.springframework.org/schema/beans
????????http://www.springframework.org/schema/beans/spring-beans.xsd"?>
????????
????????<bean?id="beanScope"?class="main.java.com.xiaodao.bean.BeanScope"?scope="singleton"></bean>
????????
?</beans>
import?org.junit.Test;
import?org.junit.runner.RunWith;
import?org.junit.runners.BlockJUnit4ClassRunner;
import?main.java.com.xiaodao.bean.BeanScope;
import?test.java.com.xiaodao.test.base.UnitTestBase;
@RunWith(BlockJUnit4ClassRunner.class)
public?class?TestBeanScope?extends?UnitTestBase?{
public?TestBeanScope()?{
super("classpath*:spring-beanscope.xml");
}
@Test
public?void?testSay()?{
BeanScope?beanScope?=?super.getBean("beanScope");
beanScope.say();
}
}



運(yùn)行報(bào)錯(cuò),No bean named 'beanScope' is defined

找不到定義為beanScope的bean


正在回答

1 回答

BeanScope類上是不是應(yīng)該加個(gè)@Service注解

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

我有個(gè)問題??????

我要回答 關(guān)注問題
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)