Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
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
胡园园
yanxuan-qc-change-system
Commits
420a55ba
Commit
420a55ba
authored
Nov 16, 2022
by
“zcwang”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 登录验证
parent
8a31c288
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
33 deletions
+3
-33
WebMvcConfig.java
.../netease/mail/yanxuan/change/web/config/WebMvcConfig.java
+3
-33
No files found.
yanxuan-qc-change-system-web/src/main/java/com/netease/mail/yanxuan/change/web/config/WebMvcConfig.java
View file @
420a55ba
...
@@ -7,6 +7,7 @@ import org.springframework.context.annotation.Configuration;
...
@@ -7,6 +7,7 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer
;
import
org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
/**
/**
...
@@ -14,7 +15,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
...
@@ -14,7 +15,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
* @date 2021/8/27 10:18
* @date 2021/8/27 10:18
*/
*/
@Configuration
@Configuration
public
class
WebMvcConfig
extends
WebMvcConfigurerAdapter
{
public
class
WebMvcConfig
implements
WebMvcConfigurer
{
@Autowired
@Autowired
private
LoginInterceptor
loginInterceptor
;
private
LoginInterceptor
loginInterceptor
;
...
@@ -26,38 +27,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
...
@@ -26,38 +27,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
*/
*/
@Override
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
loginInterceptor
).
addPathPatterns
(
"/**"
)
registry
.
addInterceptor
(
loginInterceptor
).
addPathPatterns
(
"/**"
);
.
excludePathPatterns
(
"/i/health"
)
.
excludePathPatterns
(
"/getHeliosCacheConfig"
)
.
excludePathPatterns
(
"/getDistributedCacheSchedule"
)
.
excludePathPatterns
(
"/getLocalCacheSchedule"
)
.
excludePathPatterns
(
"/nameSpace"
)
.
excludePathPatterns
(
"/loadEnvClusterInfo"
)
.
excludePathPatterns
(
"/test/**"
)
.
excludePathPatterns
(
"/sdk/resultForCacheKey"
)
.
excludePathPatterns
(
"/sdk/reportDispatchResult"
)
.
excludePathPatterns
(
"/sdk/getOpMessage"
)
.
excludePathPatterns
(
"/sdk/opMessageResp"
)
.
excludePathPatterns
(
"/openapi/control/**"
)
.
excludePathPatterns
(
"/sacs/ape/callback"
);
super
.
addInterceptors
(
registry
);
}
}
@Bean
public
ThreadPoolTaskExecutor
mvcTaskExecutor
()
{
ThreadPoolTaskExecutor
executor
=
new
ThreadPoolTaskExecutor
();
executor
.
setCorePoolSize
(
10
);
executor
.
setQueueCapacity
(
100
);
executor
.
setMaxPoolSize
(
25
);
return
executor
;
}
//配置异步支持,设置了一个用来异步执行业务逻辑的工作线程池,设置了默认的超时时间是60秒
@Override
public
void
configureAsyncSupport
(
AsyncSupportConfigurer
configurer
)
{
configurer
.
setTaskExecutor
(
mvcTaskExecutor
());
configurer
.
setDefaultTimeout
(
apolloConfig
.
getLongPollingTimeout
());
}
}
}
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