title: Resolved [org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'file' is not present]
body: <p>I am getting the error </p>
  
  <pre><code>"Resolved[org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'file' is not present]"
  </code></pre>
  
  <p>I tried all the options provided on previous posts it didn't work please tell me what I am doing wrong this is my first spring-boot application.</p>
  
  <p>My controller</p>
  
  <pre><code>
      import org.springframework.web.bind.annotation.CrossOrigin;
      import org.springframework.web.bind.annotation.RequestBody;
      import org.springframework.web.bind.annotation.RequestMapping;
      import org.springframework.web.bind.annotation.RequestMethod;
      import org.springframework.web.bind.annotation.RequestParam;
      import org.springframework.web.bind.annotation.ResponseStatus;
  
      import java.io.File;
  
      import org.springframework.beans.factory.annotation.Autowired;
      import org.springframework.http.HttpStatus;
      import org.springframework.jdbc.core.JdbcTemplate;
      import org.springframework.web.bind.annotation.RestController;
      import org.springframework.web.multipart.MultipartFile;
  
      @RestController
      public class SpringBootJdbcController {
          @Autowired
          JdbcTemplate jdbc;
  
          @Autowired
          private SpringBootJdbcService springBootJdbcService;
  
          @RequestMapping("/insert")
          public String index() {
              jdbc.execute("insert into user(name,email)values('javatpoint','java@javatpoint.com')");
              return "data inserted Successfully";
          }
  
          @CrossOrigin(origins = "http://localhost:4200")
          @ResponseStatus(HttpStatus.OK)
          @RequestMapping(value = "/uploadFile", method = RequestMethod.POST, consumes = "multipart/form-data")
          public void uploadFiles(@RequestParam("file") MultipartFile file) throws Exception {
              System.out.println("hello hello hello");
              System.out.println("file---------" + file);
              springBootJdbcService.readConfigData(file);
          }
      }
  </code></pre>
  
  <p>My Application.properties</p>
  
  <pre><code>   spring.servlet.multipart.max-file-size=10MB
     spring.servlet.multipart.max-request-size=11MB
  </code></pre>
  
  <p>api call postman image :-</p>
  
  <p><a href="https://i.stack.imgur.com/S91vm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S91vm.png" alt="enter image description here"></a></p>
  
  <p>I don't understand what is the problem. Its my first spring-boot application please help.</p>