ftp文件下载名称一致

master
zpl 3 years ago
parent 2d9f87b69e
commit cd17163d11

@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
@ -61,8 +62,8 @@ public class FileController {
* @return * @return
*/ */
@ResponseBody @ResponseBody
@RequestMapping(method = RequestMethod.GET, value = "/getPdfNew") @RequestMapping(method = RequestMethod.GET, value = "/{fileName}")
public R getPdfNew(HttpServletRequest request, HttpServletResponse response) { public R getPdfNew(HttpServletRequest request, HttpServletResponse response, @PathVariable("fileName") String fileName) {
InputStream in = null; InputStream in = null;
OutputStream out = null; OutputStream out = null;
String path = request.getParameter("Path"); String path = request.getParameter("Path");

Loading…
Cancel
Save