У меня проблема с перемоткой видео на моем сайте.
Я выясню эту проблему с заголовками http.
Мой текущий метод контроллера, который возвращает видео:
@RequestMapping(method = RequestMethod.GET, value = "/testVideo")
@ResponseBody
public FileSystemResource testVideo(Principal principal) throws IOException {
return new FileSystemResource(new File("D:\\oceans.mp4"));
}
Как переписать следующий код с поддержкой байтового диапазона?
P.S.
Я видел следующий пример http://balusc.blogspot.in/2009/02/fileservlet-supporting-resume-and.html
Но этот код выглядит мне тяжело, и я не понимаю. Я надеюсь, что в spring mvc существует проще.