Send file path as @PathVariable in Spring MVC
You should define your controller like this:
@RequestMapping(value = "/getFile/{path:.+}", method = RequestMethod.GET)
public File getFile(@PathVariable String path) {
// do something
}
You should define your controller like this:
@RequestMapping(value = "/getFile/{path:.+}", method = RequestMethod.GET)
public File getFile(@PathVariable String path) {
// do something
}