最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

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

跪求大神幫忙,不勝感激

源碼都沒(méi)法下載,那個(gè)BlockJUnit4ClassRunner報(bào)錯(cuò)不知道是什么原因,UnitTestBase是自己寫(xiě)的類(lèi)嗎?

正在回答

1 回答

UnitTestBase是自己寫(xiě)的類(lèi),代碼如下

package com.imooc.test.base;


import org.junit.After;

import org.junit.Before;

import org.springframework.beans.BeansException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import org.springframework.util.StringUtils;


public class UnitTestBase {

private ClassPathXmlApplicationContext context;

private String springXmlpath;

public UnitTestBase() {}

public UnitTestBase(String springXmlpath) {

this.springXmlpath = springXmlpath;

}

@Before

public void before() {

if (StringUtils.isEmpty(springXmlpath)) {

springXmlpath = "classpath*:spring-*.xml";

}

try {

context = new ClassPathXmlApplicationContext(springXmlpath.split("[,\\s]+"));

context.start();

} catch (BeansException e) {

e.printStackTrace();

}

}

@After

public void after() {

context.destroy();

}

@SuppressWarnings("unchecked")

protected <T extends Object> T getBean(String beanId) {

try {

return (T)context.getBean(beanId);

} catch (BeansException e) {

e.printStackTrace();

return null;

}

}

protected <T extends Object> T getBean(Class<T> clazz) {

try {

return context.getBean(clazz);

} catch (BeansException e) {

e.printStackTrace();

return null;

}

}


}


2 回復(fù) 有任何疑惑可以回復(fù)我~
#1

butcher_Inc

aligado
2015-11-13 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
Spring入門(mén)篇
  • 參與學(xué)習(xí)       268800    人
  • 解答問(wèn)題       1026    個(gè)

為您帶來(lái)IOC和AOP的基本概念及用法,為后續(xù)高級(jí)課程學(xué)習(xí)打下基礎(chǔ)

進(jìn)入課程

跪求大神幫忙,不勝感激

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

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

幫助反饋 APP下載

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

公眾號(hào)

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