title: Spring boot download file just being shown in browser, not actually downloading
body: <p>I have followed this example:</p>
  
  <pre><code>@RequestMapping(value = "/files/{file_name}", method = RequestMethod.GET)
  @ResponseBody
  public FileSystemResource getFile(@PathVariable("file_name") String fileName) {
      return new FileSystemResource(myService.getFileFor(fileName)); 
  }
  </code></pre>
  
  <p>from this thread: <a href="https://stackoverflow.com/questions/5673260/downloading-a-file-from-spring-controllers">Downloading a file from spring controllers</a></p>
  
  <p>This works fine, but instead of downloading the file, the browser displays it.</p>
  
  <p>In the comments someone mentions to add:</p>
  
  <pre><code>produces = MediaType.APPLICATION_OCTET_STREAM_VALUE
  </code></pre>
  
  <p>in order to force the browser to download the file. However this still doesn't work for me. Anyone have any idea how to force the download?</p>