Spring Security's SecurityContext get unexpectedly cleared in a MockMvc Test
Background
At work, there’s some test written where I wanted to query the database (repository) after mockMvc request has been made to verify the result. This is a very simple illustration of what it looks like.
@SpringBootTest
@AutoConfigureMockMvc
...
bwgjoseph.com3 min read