I\'m trying to create a simple spring boot web project with security. I can launch the application fine and the security is working fine. However, I have some components t
For me, the fix was to update my test annotations. I replaced:
@SpringApplicationConfiguration(classes = { MyApplication.class }) @RunWith(SpringJUnit4ClassRunner.class)
with
@RunWith(SpringRunner.class) @SpringBootTest @ContextConfiguration(classes = MyApplication.class)