Some time ago, when doing an internal data processing project, there would be HTTP service calls between the systems, and we were using spring rest programming, which is the resttemplate implementation provided by spring.
After the data in the program is read in the Excel file, the RESTful interface is sent back to the backend, since the transmitted data is a collection of array types, but when acquired in the background, the data type is programmed with the ArrayList type, the result may be known, and the error is made when forcing the type conversion to Java. Lang. ClassCastException.
Later found the reason to find that the call to the RESTful interface, the transmitted data type should be to implement the serialization interface is serializable, because the array is not a certain type, not to mention serialization, all later instead of using ArrayList to do the data carrier is OK.
Java serialization of RESTful interface calls