Mock @Component bean for Spring boot test context

后端 未结 0 548
予麋鹿
予麋鹿 2021-02-11 19:37

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.

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