top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is a MultipartResolver in java and when its used?

0 votes
695 views
What is a MultipartResolver in java and when its used?
posted Sep 4, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

MultipartResolver interface is used for uploading files – CommonsMultipartResolver and StandardServletMultipartResolver are two implementations provided by spring framework for file uploading. By default there are no multipart resolvers configured but to use them for uploading files, all we need to define a bean named “multipartResolver” with type as MultipartResolver in spring bean configurations.

Once configured, any multipart request will be resolved by the configured MultipartResolver and pass on a wrapped HttpServletRequest. Then it’s used in the controller class to get the file and process it.

answer Sep 13, 2017 by Ayush Srivastav
...