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); }
How to get an instance of ApplicationContext in a JUnit unit test case
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324848507&siteId=291194637
Recommended
Ranking