When SpringMVC receives the String array from the front-end ajax, it automatically splits the elements in the array.

< H2 > problem description < / H2 > The

front end transcodes the picture base64, places it in an array of base64 strings, and passes it to the background when the page is submitted.

this is the page submitted by the front end, and multiple pictures may be submitted

the situation in which there is a problem

submit a single picture

clipboard.png

ajaxsize1

clipboard.png

","

clipboard.png


clipboard.png

ajax

clipboard.png

","
clipboard.png

< H2 > question < / H2 >

is this because when SpringMVC does parameter binding conversion, it will split the parameters of the array type? But why not multiple pictures? Is there a solution?

Thanks in advance!


by default, this will be treated as a string separated by commas.
convert to json

Menu