springboot单元测试
@RunWith(SpringRunner.class) @SpringBootTest(classes = DemoApplication.class)//加载启动类 public class TestAnnotation { @Autowired private AnnontationServiceTestImpl a; @Test public void testA(){ System.out.println("单元测试开始"); a.anoundTest(); System.out.println("单元测试完成"); } }