The following client code
FormData formData = FormData(document.getElementById(formElemId));
formData.append('version', null);
when received in Server Side via Spring MVC as below
@RequestParam(value = 'version', required = false) Integer versionNumber
throws the following exception
Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "null"
You can resolve this issue by adding
defaultValue
like below.see documentation