SpringBoot老版本引入单元测试: import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; .... @SpringBootTest @RunWith(SpringRunner.class) public class xxx{ @Before public void setUp() throws Exception{ ... } } Sprin