Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
241a1809
Commit
241a1809
authored
Oct 25, 2019
by
sgjj
Browse files
修复无法访问swagger的问题
parent
983de28d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/config/WebConfig.java
View file @
241a1809
...
...
@@ -72,7 +72,7 @@ public class WebConfig implements WebMvcConfigurer {
registry
.
addResourceHandler
(
"/html/**"
).
addResourceLocations
(
"/html/"
,
"file:html/"
);
//三种映射方式 webapp下、当前目录下、jar内
registry
.
addResourceHandler
(
"/app/**"
).
addResourceLocations
(
"/app/"
,
"file:app/"
,
"classpath:/app/"
);
registry
.
addResourceHandler
(
"/static/**"
,
"/**"
).
addResourceLocations
(
"/static/"
,
"file:static/"
,
"classpath:/static/"
);
registry
.
addResourceHandler
(
"/static/**"
,
"/**"
).
addResourceLocations
(
"/static/"
,
"file:static/"
,
"classpath:/static/"
,
"classpath:/META-INF/resources/"
);
registry
.
addResourceHandler
(
"/api/**"
).
addResourceLocations
(
"/api/"
,
"file:api/"
,
"classpath:/api/"
);
if
(
new
File
(
uploadFloderPath
).
isAbsolute
()){
//如果指定了绝对路径,上传的文件都映射到uploadMapping下
...
...
Write
Preview
Supports
Markdown
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