The "org.springframework.web.multipart.commons" package was removed in Spring6?

Today, when doing the SpringMVC file upload exercise, when configuring the bean of the MultipartResolver interface, I found that there is no "org.springframework.web.multipart.commons.CommonsMultipartResolver" class in my project. After searching, I found that it is actually connected to "org. springframework.web.multipart.commons.*" package could not be found.

I have searched the Internet for a long time and have not found the same problem. The most talked about on the Internet is that the implementation of the MultipartResolver interface needs to import the Apache Commons FileUpload dependency, but I have already imported the dependency:

I think it may be caused by the mismatch between Apache Commons FileUpload 1.4x and Apache Commons io 2.5x, so I imported Apache Commons FileUpload 1.3.1x from their successful case on the Internet, and the same problem still occurs, which is a headache.

Later, I thought that since this package is in the "Spring-Web" dependency, I tried to replace the "Spring-Web 6.0.0x" I used with "Spring-Web 5.3.19x", and the problem was solved.

Then change back to version 6.0.0 again, the problem reappears, so is Spring 6 removed the "org.springframework.web.multipart.commons.*" package? Is there a big guy who can help explain, what should I do if I want to use CommonsMultipartResolver in Spring 6?

Guess you like

Origin blog.csdn.net/m0_56680022/article/details/128696062