缺少该注解
@RunWith(SpringRunner.class)
注解的作用:
让测试在Spring容器环境下执行。如测试类中无此注解,将导致service,dao等自动注入失败。
@RunWith(SpringRunner.class)
@SpringBootTest
public class ProjectFontControllerTest {
}
缺少该注解
@RunWith(SpringRunner.class)
注解的作用:
让测试在Spring容器环境下执行。如测试类中无此注解,将导致service,dao等自动注入失败。
@RunWith(SpringRunner.class)
@SpringBootTest
public class ProjectFontControllerTest {
}