阅读背景:

JUnit单元测试用例获取ApplicationContext实例的方法

来源:互联网 
public class TPlatformInfoTest extends TestBase{
    
    private static MyHttpClient TPlatformInfoDispose;
    
    @BeforeClass
    public static void setUpBeforeClass(){
        System.out.println("***********here init first***************");
        TPlatformInfoDispose = new MyHttpClient("platform");
        DataSourceContextHolder.setDbType("ds2");
        ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:WEB-INF/rest-*.xml");
        pfm = ctx.getBean(TPlatformInfoMapper.class);
        dim = ctx.getBean(TDeviceInfoMapper.class);
    }public class TPlatformInfoTest extends TestBase{



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: