[BUG] interface parameters resolve SpringMVC interface parameter parsing

Today encountered a BUG, ​​passing the front end of an array of numbers, to receive the rear end of string type, the result can not be received, as follows

problem:

GET request:

front end:

  configJsonArr:[1,2]

rear end:

  private String configJsonArray;

The rear end of the string into the array package, to parse using JsonArray

 

Finally found the problem, request line (numbers in the array can not be delivered, can only pass strings)

 

solution:

Last amended as follows:

Front-end delivery:

  configJsonArr:[“1”,“2”]

rear end:

  private String configJsonArray;

Guess you like

Origin www.cnblogs.com/july-sunny/p/12590427.html
Recommended