Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
<p>Hi Guys as  this is my controller class when i run this application in postman adds-on its displaying status 200 ok.but file not reading how can i pass filename with extention as a string parameter in method? what iam missing ur assistance is highly appreciable and a knowledgeable</p>

<pre><code>@RequestMapping(value = "/file/{name}", method = RequestMethod.GET)
public ResponseEntity&lt;InputStreamResource&gt; download(@PathVariable String name) {
    try {
        File inputFile = fileSystemHandler.read(name);
        HttpHeaders headers = new HttpHeaders();
        // headers.add(HttpHeaders.CONTENT_TYPE, "application/octet-stream");
         headers.add(HttpHeaders.CONTENT_LENGTH, "" + inputFile.length());
        headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename= " + name);
        InputStreamResource isr = new InputStreamResource(new FileInputStream(inputFile));
        return new ResponseEntity&lt;InputStreamResource&gt;(isr, headers, HttpStatus.OK);
    } catch (Exception ex) {
        // return data;
    }
    return null;
}
</code></pre>

<p>And this is my File system handler class</p>

<pre><code>public File read(String name) {
    File inputFile = null;
    try {
        inputFile = new File(env.getProperty("file.Path") + name);
        return inputFile;
    } catch (Exception ex) {
        Logger.getLogger(FileSystemHandler.class.getName()).log(Level.SEVERE, null, ex);
    }
    return inputFile;
}
</code></pre>