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); }