springboot测试类测试时注入的对象为null
解决方法:
正常来说测试类加上以下配置就可以正常@Test测试,但:http://www.yayihouse.com/yayishuwu/chapter/2266
@RunWith(SpringRunner.class)
@SpringBootTest(classes = AdminApplication.class)
springboot测试类测试时注入的对象为null
解决方法:
正常来说测试类加上以下配置就可以正常@Test测试,但:http://www.yayihouse.com/yayishuwu/chapter/2266
@RunWith(SpringRunner.class)
@SpringBootTest(classes = AdminApplication.class)