MediaType.MULTIPART_FORM_DATA_VALUE) public String formForUpload(@RequestParam("file") MultipartFilerestTemplate.postForObject("http://localhost:8080/rest/something",
我有一个SpringMVC控制器,它使用Spring-Data的分页支持:public class ModelController {
}
并且我想使用nice SpringMVC test Support来测试RequestMapping。为了保持这些测试的速度和与所有其他正在进行的东西隔离,我不想创建完整的ApplicationConte
与Authentication token passed to ControllerAdvice is null when running through MockMvc类似,我使用Spring DataREST和Spring Security对Spring Boot 1.5.16应用程序进行的MockMvc测试总是有一个空Authentication参数,无论我是手动添加上下文还是使用@WithUserDetails这是Spring