|
@@ -59,7 +59,7 @@ public class FileController {
|
|
|
@GetMapping("/**")
|
|
|
public Object readFile() throws FileNotFoundException {
|
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
- String virtualPath = request.getServletPath();
|
|
|
+ String virtualPath = request.getRequestURI();
|
|
|
// 除去虚拟路径前缀
|
|
|
virtualPath = virtualPath.replace(virtualFilePrefix(), "");
|
|
|
String realPath = Paths.get(baseDir, virtualPath).toString();
|