title: can't import org.springframework.data.rest.webmvc.ResourceNotFoundException;
body: <p>I haven not being able to import the following library to use it for handling some error. I have been looking up on internet about this problem but cannot succeed. Is it that i have to download an specific .jar? if so, I would appreciate the help to know how to do it. I am pretty new into this web and spring stuff.</p>
  <p>Code:</p>
  <pre><code>package org.magnum.dataup;
  
  import java.io.IOException;
  import java.io.OutputStream;
  import java.util.*;
  import java.util.concurrent.atomic.AtomicLong;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  import org.magnum.dataup.model.Video;
  import org.magnum.dataup.model.VideoStatus;
  import org.magnum.dataup.model.VideoStatus.VideoState;
  import org.eclipse.jetty.http.HttpStatus;
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.PathVariable;
  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.ResponseBody;
  import org.springframework.web.multipart.MultipartFile;
  import org.springframework.data.rest.webmvc.ResourceNotFoundException;
  
  @Controller
  public class VideoController {
  
    public static final String VIDEO_SVC_PATH = &quot;/video&quot;;
    public static final String VIDEO_DATA_PATH = VIDEO_SVC_PATH + &quot;/{id}/data&quot;;
    private static final AtomicLong currentId = new AtomicLong(0L);
  
    private Map&lt;Long, Video&gt; videos = new HashMap&lt;Long, Video&gt;();
  
    @RequestMapping(value = VIDEO_SVC_PATH, method = RequestMethod.GET)
    public @ResponseBody Collection&lt;Video&gt; getVideoList() {
      return videos.values();
    }
  
    @RequestMapping(value = VIDEO_DATA_PATH, method = RequestMethod.GET)
    public void getData(@PathVariable(&quot;id&quot;) long id, HttpServletResponse response)
        throws IOException {
      VideoFileManager videoData = VideoFileManager.get();
  
      try {
        videoData.copyVideoData(videos.get(id), response.getOutputStream());
      } catch (Exception e) {
        throw new ResourceNotFoundException();
      }
    }
  
    @RequestMapping(value = VIDEO_SVC_PATH, method = RequestMethod.POST)
    public @ResponseBody Video addVideoMetadata(@RequestBody Video v, HttpServletRequest request)
        throws IOException {
      v.setId(currentId.incrementAndGet());
      v.setDataUrl(getUrlBaseForLocalServer(request) + &quot;/&quot; + VIDEO_SVC_PATH + v.getId() + &quot;/data&quot;);
      videos.put(v.getId(), v);
      return v;
    }
  
    @RequestMapping(value = VIDEO_DATA_PATH, method = RequestMethod.POST)
    public @ResponseBody VideoStatus addVideoData(@PathVariable(&quot;id&quot;) long id,
        @RequestParam MultipartFile data) throws IOException {
      VideoFileManager videoData = VideoFileManager.get();
      try {
        videoData.saveVideoData(videos.get(id), data.getInputStream());
      } catch (Exception e) {
        throw new ResourceNotFoundException();
      }
      return new VideoStatus(VideoState.READY);
    }
  
    private String getUrlBaseForLocalServer(HttpServletRequest request) {
      String baseURL = &quot;http://&quot; + request.getServerName()
          + ((request.getServerPort() != 80) ? &quot;:&quot; + request.getServerPort() : &quot;&quot;);
      return baseURL;
    }
  
  }
  </code></pre>
  <p>Error Message when importing:</p>
  <p><a href="https://i.stack.imgur.com/RbHPx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RbHPx.png" alt="enter image description here" /></a></p>
  <p>Thanks in advance</p>