Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
8855f3d8
Commit
8855f3d8
authored
Mar 03, 2026
by
liyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 在后端文件上传工具类中添加URL端口替换逻辑,将8882替换为8082
parent
5915e06c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
FileUploadUtils.java
...ain/java/com/ruoyi/common/utils/file/FileUploadUtils.java
+4
-1
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
View file @
8855f3d8
...
...
@@ -185,7 +185,10 @@ public class FileUploadUtils
String
currentDir
=
StringUtils
.
substring
(
uploadDir
,
dirLastIndex
);
// 替换反斜杠为正斜杠,确保路径格式正确
currentDir
=
currentDir
.
replaceAll
(
"\\\\"
,
"/"
);
return
Constants
.
RESOURCE_PREFIX
+
"/"
+
currentDir
+
"/"
+
fileName
;
String
url
=
Constants
.
RESOURCE_PREFIX
+
"/"
+
currentDir
+
"/"
+
fileName
;
// 将URL中的8882端口替换为8082
url
=
url
.
replace
(
":8882"
,
":8082"
);
return
url
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment