Springboot in file transfer

  In the company's project development, you need to receive documents and other services delivered documents to other documents, before saying a simple page using Multipart transfer files to the server, which is obviously a little too simple. Now it is necessary to transfer files, but also to pass parameters. So the ideal situation is to have them as objects to pass, the other party to accept the object of the same object type. But http is the transfer of a message, and the message is delivered byte data converter needs to be converted into a format the data we need, such as String, Object and so on.

  During development, access to the file stream always wrong, suggesting that there is no suitable HttpMessageConveter, I Baidu checked, the default is to use my system RestTemplate, this requires the use of StringHttpMessageConverter, this converter is very powerful feeling, and then not being given, it is curious its source, but it is estimated will be a lot, and then himself can not read, you can slowly research.

Guess you like

Origin www.cnblogs.com/Robin008/p/11094353.html