Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-07-14 11:39:19 +08:00
commit 49ce333723
1 changed files with 7 additions and 1 deletions

View File

@ -21,8 +21,12 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
@Value("${resource.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
@ -81,6 +85,8 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
// 文件保存
uploadFile.transferTo(new File(path, fileName));
logger.info("----------------------------------文件上传成功--------------------------------------");
String filePath = request.getScheme() + "://" + root_url
+ ":" + request.getServerPort() + context_path + "/devModelFile/" + type + fileName;
return folder.getPath();
} catch (IOException e) {
logger.info("----------------------------------文件上传失败--------------------------------------");