参数问题:nested exception is : For input string: “null“,已解决。

时间:2025-02-13 14:51:13
  • 出现问题:nested exception is : For input string: “null“
: Failed to convert value of type '' to required type ''; nested exception is : For input string: "null"
	at (:133)
	at (:121)
	at (:167)
	at (:134)
	at (:105)
	at (:878)
	at (:792)
	at (:87)
	at (:1040)
	at (:943)
	at (:1006)
	at (:898)
  • 出现原因:前端传值时把这个数据当成空值传 null
  • 但是后端接受是String类型 将null当作“null”字符接收。
  • 解决:前端当前值为空就不传,或者后端使用Integer接收该参数。