SpringBoot如何集成JUnit

SpringBoot如何集成JUnit

@RunWith(SpringRunner.class)
@SpringBootTest
public class XXXServiceTest {

    @Autowired
    private XXXService xxxService;

    @Test
    public void test1() {
    }
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *