Spring @WebMvcTest忽略@Order组件

时间:2019-01-06 22:50:52

标签: java spring-boot-test

我是Spring测试的新手,但正在尝试使用此基本设置为控制器编写单元测试:

@RunWith(SpringRunner.class)
@WebMvcTest(TestController.class)
public class ControllerTest {
   @Autowired
   private MockMvc mockMvc;

   // declare, inject and init mock beans and write test 
}

但是,我的问题是似乎在抱怨没有使用@Order注释的应用程序组件的bean。无论如何,我可以告诉我的测试忽略这些组件吗?

0 个答案:

没有答案
相关问题