My @ControllerAdvice annotated Controller looks like this:
@ControllerAdvice
@ControllerAdvice public class GlobalControllerExceptionHandler { @ResponseStatu
Since Spring 4.2, you can register your ControllerAdvice directly into your StandaloneMockMvcBuilder:
MockMvcBuilders .standaloneSetup(myController) .setControllerAdvice(new MyontrollerAdvice()) .build();