私のテスト
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
byte[] bytes = objectMapper.writeValueAsBytes(webFile);
this.mockMvc.perform(post("/loadFile.json").accept(MediaType.APPLICATION_JSON).contentType(MediaType.APPLICATION_JSON).content(bytes)).andExpect(status().isOk());
私のコントローラー
@RequiredPermission(RequiredPermission.OperationType.viewProject)
@RequestMapping(value = "/loadFile", method = RequestMethod.POST)
public
@ResponseBody
ModelAndView load(@RequestBody WebFile document)
{ ... }
しかし、常に400エラーが発生します