Spring MVC controller Test – print the result JSON String February 7, 2023 by Tarik Try this code: resultActions.andDo(MockMvcResultHandlers.print());