【发布时间】:2018-05-04 19:24:30
【问题描述】:
我想在运行集成测试时禁用 @EnableAsync。
我试图用我的测试包中同名的类覆盖带有 @EnableAsync 注释的配置文件,但它不起作用。
在本主题中:Is it possible to disable Spring's @Async during integration test?
我已经看到了:
您可以...创建一个测试配置或简单地使用 SyncTaskExecutor 覆盖任务执行器
但我不明白该怎么做。
有什么建议吗?谢谢
【问题讨论】:
标签: spring-boot integration-testing spring-test-mvc