This code will surely help you.
String filePath = request.getServletContext().getRealPath("https://stackoverflow.com/");
multipartFile.transferTo(new File(filePath));
This code will surely help you.
String filePath = request.getServletContext().getRealPath("https://stackoverflow.com/");
multipartFile.transferTo(new File(filePath));