No qualifier bean found in test
I use spring boot 3.3.2 and lombok. No issue to run application
No qualifier bean found in test
I use spring boot 3.3.2 and lombok. No issue to run application
Is it possible to conveniently override/remove an annotation from a @Component annotated class when running a SpringBootTest?
I have @Component
named RequestInterceptor
, which is also annotated with @RestartScope
. Problem is, since I’m running integration tests with SpringBootTest and clearing contexts with @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD
– I’m still fiddling with it), whenever a test bumps into a bean method called from the RequestInterceptor, I get the following exception thrown:
Why is my bean not replaced with @MockBean?
I have an integration test with @MockBean
, but the bean is not replaced. The real bean is used. Why is the bean not replaced?
@WebMvcTest doesn’t see @Value Annotation
I created a single MessageSourceConfig like below: