I'm looking at sending a complex data type [a serialized java bean (strings, map, and an image)] from an applet to a Spring structured web application.
How would I send the bean? I'm assuming that I would create a URLConnection
, and then send out a post with a serialized version of the bean.
How would I set up spring to catch this on the Server side? [Would I use a @RequestParam
or @ModelAttribute
]
Both the applet and the server have access to the model.
It depends on how you serialize it. If it is JSON, you can use @RequestBody
, if it is binary (base64 string), it should be @RequestParam
, and then you should deserialize it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.