package org.nl; import org.junit.After; import org.junit.Before; import org.junit.runner.RunWith; import org.nl.modules.wql.WQLCore; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @RunWith(SpringRunner.class) public class BaseTest { @Before public void init() { WQLCore.defalutDBName = "eladmin"; WQLCore.ROOT = "org.nl"; try { WQLCore.init(); } catch (Exception e) { e.printStackTrace(); } } @After public void after() { System.out.println("测试结束-----------------"); } }