Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
renren-fast
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MaintenanceFund
renren-fast
Commits
2b3769c7
Commit
2b3769c7
authored
Jun 04, 2025
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
屏蔽swagger
parent
73470dbf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
src/main/java/io/renren/config/CorsConfig.java
src/main/java/io/renren/config/CorsConfig.java
+5
-5
src/main/java/io/renren/config/ShiroConfig.java
src/main/java/io/renren/config/ShiroConfig.java
+6
-6
No files found.
src/main/java/io/renren/config/CorsConfig.java
View file @
2b3769c7
...
...
@@ -10,11 +10,11 @@ public class CorsConfig implements WebMvcConfigurer {
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"/**"
).
addResourceLocations
(
"classpath:/static/"
);
registry
.
addResourceHandler
(
"swagger-ui.html"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/"
);
registry
.
addResourceHandler
(
"/webjars/**"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
);
//
registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
//
registry.addResourceHandler("swagger-ui.html")
//
.addResourceLocations("classpath:/META-INF/resources/");
//
registry.addResourceHandler("/webjars/**")
//
.addResourceLocations("classpath:/META-INF/resources/webjars/");
WebMvcConfigurer
.
super
.
addResourceHandlers
(
registry
);
}
...
...
src/main/java/io/renren/config/ShiroConfig.java
View file @
2b3769c7
...
...
@@ -56,14 +56,14 @@ public class ShiroConfig {
shiroFilter
.
setFilters
(
filters
);
Map
<
String
,
String
>
filterMap
=
new
LinkedHashMap
<>();
filterMap
.
put
(
"/webjars/**"
,
"anon"
);
filterMap
.
put
(
"/druid/**"
,
"anon"
);
//
filterMap.put("/webjars/**", "anon");
//
filterMap.put("/druid/**", "anon");
filterMap
.
put
(
"/app/**"
,
"anon"
);
filterMap
.
put
(
"/sys/login"
,
"anon"
);
filterMap
.
put
(
"/swagger/**"
,
"anon"
);
filterMap
.
put
(
"/v2/api-docs"
,
"anon"
);
filterMap
.
put
(
"/swagger-ui.html"
,
"anon"
);
filterMap
.
put
(
"/swagger-resources/**"
,
"anon"
);
//
filterMap.put("/swagger/**", "anon");
//
filterMap.put("/v2/api-docs", "anon");
//
filterMap.put("/swagger-ui.html", "anon");
//
filterMap.put("/swagger-resources/**", "anon");
filterMap
.
put
(
"/captcha.jpg"
,
"anon"
);
filterMap
.
put
(
"/**"
,
"oauth2"
);
shiroFilter
.
setFilterChainDefinitionMap
(
filterMap
);
...
...
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