abreuse / smart-notes

Write simple quick notes and retrieve them in an ergonomic style
0 stars 0 forks source link

MockMvc bean is not autowired #1

Open abreuse opened 5 years ago

abreuse commented 5 years ago

When running test NoteControllerTest, the MockMvc bean is not autowired, it says kotlin.UninitializedPropertyAccessException: lateinit property mvc has not been initialized

abreuse commented 5 years ago

From what I see, @WebMvcTest(NoteController::class) should allow the opportunity to Autowire Spring web beans, like MockMvc

abreuse commented 5 years ago

Related StackOverflow : https://stackoverflow.com/questions/56877121/how-to-autowire-mockmvc-bean-correctly