Merge branch 'master' into docker_package
This commit is contained in:
commit
49ce333723
|
@ -21,8 +21,12 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
|
||||||
|
|
||||||
@Value("${resource.devModelFilePath}")
|
@Value("${resource.devModelFilePath}")
|
||||||
private String devModelFilePath;
|
private String devModelFilePath;
|
||||||
|
@Value("${resource.root_url}")
|
||||||
|
private String root_url;
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(FileUploadController.class);
|
@Value("${server.servlet.context-path}")
|
||||||
|
private String context_path;
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(FileUploadController.class);
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -81,6 +85,8 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
|
||||||
// 文件保存
|
// 文件保存
|
||||||
uploadFile.transferTo(new File(path, fileName));
|
uploadFile.transferTo(new File(path, fileName));
|
||||||
logger.info("----------------------------------文件上传成功--------------------------------------");
|
logger.info("----------------------------------文件上传成功--------------------------------------");
|
||||||
|
String filePath = request.getScheme() + "://" + root_url
|
||||||
|
+ ":" + request.getServerPort() + context_path + "/devModelFile/" + type + fileName;
|
||||||
return folder.getPath();
|
return folder.getPath();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.info("----------------------------------文件上传失败--------------------------------------");
|
logger.info("----------------------------------文件上传失败--------------------------------------");
|
||||||
|
|
Loading…
Reference in New Issue