springboot2.2.x的单元测试demo:
import org.junit.jupiter.api.*;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
public class DemoTest {
@BeforeAll
public static void beforeAll(){
System.out.println("beforeAll");
}
@BeforeEach
public void beforeEach(){