Mock @Component bean for Spring boot test context

后端 未结 0 1368
悲&欢浪女
悲&欢浪女 2021-02-11 19:52

I need to mock @Component beans for all my tests.

I ve tried to use a @Primary and @TestConfiguration and excludeFilter in the @ComponentScan but it does not work.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题