Dubbo service upload file solution

The dubbo service does not support the parameters of the File file type. The remote call is like this: the interface call is actually the data sending process. The type of File cannot be serialized, because File is not data, but an abstraction of a disk file.

solution:

  1. Use the hessian protocol for transmission (refer to the dubbo official website, or search for dubbo hessian )
  2. Convert the file to byte[] and continue to use the dubbo protocol (this situation is generally used for uploading files that are associated with business)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324606159&siteId=291194637