Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
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
huluobin
gogirl-miniapp-backend
Commits
c615bfc1
Commit
c615bfc1
authored
Jul 18, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8df61b61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
pom.xml
pom.xml
+17
-5
MvcInterceptorConfig.java
...rl/infrastructure/config/config/MvcInterceptorConfig.java
+6
-0
No files found.
pom.xml
View file @
c615bfc1
...
...
@@ -31,7 +31,7 @@
<qiniu-java-sdk.version>
[7.2.0, 7.2.99]
</qiniu-java-sdk.version>
<qcloudsms.version>
1.0.6
</qcloudsms.version>
<!--doc-->
<springfox-swagger-ui.version>
2.9.
2
</springfox-swagger-ui.version>
<springfox-swagger-ui.version>
2.9.
1
</springfox-swagger-ui.version>
<springfox-swagger2.version>
2.9.2
</springfox-swagger2.version>
<swagger-bootstrap-ui.version>
1.9.6
</swagger-bootstrap-ui.version>
<!--common-->
...
...
@@ -240,15 +240,27 @@
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
${springfox-swagger2.version}
</version>
<exclusions>
<exclusion>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-models
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
自动生成接口文档
-->
<!--
https://mvnrepository.com/artifact/io.swagger/swagger-models
-->
<dependency>
<groupId>
io.s
pringfox
</groupId>
<artifactId>
s
pringfox-swagger-ui
</artifactId>
<version>
${springfox-swagger-ui.version}
</version>
<groupId>
io.s
wagger
</groupId>
<artifactId>
s
wagger-models
</artifactId>
<version>
1.5.21
</version>
</dependency>
<!-- <!– 自动生成接口文档 –>-->
<!-- <dependency>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>springfox-swagger-ui</artifactId>-->
<!-- <version>${springfox-swagger-ui.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
...
...
src/main/java/com/gogirl/infrastructure/config/config/MvcInterceptorConfig.java
View file @
c615bfc1
...
...
@@ -25,9 +25,11 @@ public class MvcInterceptorConfig extends WebMvcConfigurationSupport {
/*addPathPatterns 用于添加拦截规则*/
/* **表示拦截所有请求*/
/*excludePathPatterns 用户排除拦截*/
registry
.
addInterceptor
(
loginHandlerInterceptor
)
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/swagger-resources/**"
,
"/webjars/**"
,
"/v2/**"
,
"/swagger-ui.html/**"
,
"/error"
)
.
excludePathPatterns
(
"/doc.html"
)
//登陆
.
excludePathPatterns
(
"/customer/message/pageIn"
)
.
excludePathPatterns
(
"/customer/message/pageOut"
)
...
...
@@ -74,6 +76,7 @@ public class MvcInterceptorConfig extends WebMvcConfigurationSupport {
registry
.
addInterceptor
(
authHandlerInterceptor
)
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/swagger-resources/**"
,
"/webjars/**"
,
"/v2/**"
,
"/swagger-ui.html/**"
,
"/error"
)
.
excludePathPatterns
(
"/doc.html"
)
//登陆
.
excludePathPatterns
(
"/customer/message/loginLog"
)
.
excludePathPatterns
(
"/customer/message/pageIn"
)
...
...
@@ -137,6 +140,9 @@ public class MvcInterceptorConfig extends WebMvcConfigurationSupport {
registry
.
addResourceHandler
(
"/webjars/**"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
);
registry
.
addResourceHandler
(
"/doc.html"
).
addResourceLocations
(
"classpath:/META-INF/resources/"
);
registry
.
addResourceHandler
(
"/webjars/**"
).
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
);
}
// @Bean
...
...
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