Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
d07cf5c2
Commit
d07cf5c2
authored
May 26, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
回调方法被拦截
parent
d4ee79ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
src/main/java/cn/timer/api/config/interceptor/WebSecurityConfig.java
+10
-8
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+1
-1
No files found.
src/main/java/cn/timer/api/config/interceptor/WebSecurityConfig.java
View file @
d07cf5c2
...
@@ -19,10 +19,10 @@ import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
...
@@ -19,10 +19,10 @@ import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
@Configuration
@Configuration
public
class
WebSecurityConfig
implements
WebMvcConfigurer
{
public
class
WebSecurityConfig
implements
WebMvcConfigurer
{
@Resource
@Resource
private
UserMethodArgumentResolver
userMethodArgumentResolver
;
private
UserMethodArgumentResolver
userMethodArgumentResolver
;
@Bean
@Bean
public
RedisSessionInterceptor
getSessionInterceptor
()
{
public
RedisSessionInterceptor
getSessionInterceptor
()
{
return
new
RedisSessionInterceptor
();
return
new
RedisSessionInterceptor
();
...
@@ -35,9 +35,11 @@ public class WebSecurityConfig implements WebMvcConfigurer {
...
@@ -35,9 +35,11 @@ public class WebSecurityConfig implements WebMvcConfigurer {
//.excludePathPatterns("/")
//.excludePathPatterns("/")
registry
.
addInterceptor
(
getSessionInterceptor
())
registry
.
addInterceptor
(
getSessionInterceptor
())
.
addPathPatterns
(
"/**"
)
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/call
back
/**"
)
.
excludePathPatterns
(
"/call
Back/policy
/**"
)
.
excludePathPatterns
(
"/callBack/policy/CallBack"
)
.
excludePathPatterns
(
"/callBack/policy/CallBack"
)
.
excludePathPatterns
(
"/callBack/policy/insuredCallBack"
)
.
excludePathPatterns
(
"/callBack/policy/payStatus"
)
.
excludePathPatterns
(
"/callBack/policy/payCallBack"
)
.
excludePathPatterns
(
"/callBack/policy/issueCallback"
)
.
excludePathPatterns
(
"/superLogin/**"
)
.
excludePathPatterns
(
"/superLogin/**"
)
.
excludePathPatterns
(
"/actuator/*"
)
.
excludePathPatterns
(
"/actuator/*"
)
.
excludePathPatterns
(
"/doc*"
)
.
excludePathPatterns
(
"/doc*"
)
...
@@ -66,14 +68,14 @@ public class WebSecurityConfig implements WebMvcConfigurer {
...
@@ -66,14 +68,14 @@ public class WebSecurityConfig implements WebMvcConfigurer {
// registry.addInterceptor(getSessionInterceptor()).addPathPatterns("/**").excludePathPatterns("/swagger-ui*");
// registry.addInterceptor(getSessionInterceptor()).addPathPatterns("/**").excludePathPatterns("/swagger-ui*");
}
}
/**
/**
* 配置消息转换器--这里我用的是alibaba 开源的 fastjson
* 配置消息转换器--这里我用的是alibaba 开源的 fastjson
* @param converters
* @param converters
*/
*/
@Override
@Override
public
void
configureMessageConverters
(
List
<
HttpMessageConverter
<?>>
converters
)
{
public
void
configureMessageConverters
(
List
<
HttpMessageConverter
<?>>
converters
)
{
// Iterator<HttpMessageConverter<?>> iterator = converters.iterator();
// Iterator<HttpMessageConverter<?>> iterator = converters.iterator();
// while(iterator.hasNext()){
// while(iterator.hasNext()){
// HttpMessageConverter<?> converter = iterator.next();
// HttpMessageConverter<?> converter = iterator.next();
...
@@ -120,12 +122,12 @@ public class WebSecurityConfig implements WebMvcConfigurer {
...
@@ -120,12 +122,12 @@ public class WebSecurityConfig implements WebMvcConfigurer {
converters
.
add
(
0
,
fastConverter
);
converters
.
add
(
0
,
fastConverter
);
}
}
@Override
@Override
public
void
addArgumentResolvers
(
List
<
HandlerMethodArgumentResolver
>
argumentResolvers
)
{
public
void
addArgumentResolvers
(
List
<
HandlerMethodArgumentResolver
>
argumentResolvers
)
{
argumentResolvers
.
add
(
userMethodArgumentResolver
);
argumentResolvers
.
add
(
userMethodArgumentResolver
);
}
}
// @Override
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// public void addCorsMappings(CorsRegistry registry) {
//// System.out.println("我是MyWebConfig跨域");
//// System.out.println("我是MyWebConfig跨域");
...
...
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
d07cf5c2
...
@@ -557,7 +557,7 @@ public class InsureContorll {
...
@@ -557,7 +557,7 @@ public class InsureContorll {
insurePolicy
.
setStatus
(
"4"
);
/*支付中状态*/
insurePolicy
.
setStatus
(
"4"
);
/*支付中状态*/
insurePolicy
.
updateById
();
insurePolicy
.
updateById
();
Map
returnMap
=
Maps
.
newHashMap
();
Map
returnMap
=
Maps
.
newHashMap
();
returnMap
.
put
(
"url"
,
importPayInfo
.
get
(
"pay_url"
).
toString
()+
"&jump_url"
+
base_api_url
+
"/callBack/policy/payStatus?policyId="
+
insurePolicy
.
getId
());
returnMap
.
put
(
"url"
,
importPayInfo
.
get
(
"pay_url"
).
toString
()+
"&jump_url
=
"
+
base_api_url
+
"/callBack/policy/payStatus?policyId="
+
insurePolicy
.
getId
());
returnMap
.
put
(
"payId"
,
insurePay
.
getId
());
returnMap
.
put
(
"payId"
,
insurePay
.
getId
());
return
ResultUtil
.
data
(
returnMap
);
return
ResultUtil
.
data
(
returnMap
);
}
else
{
}
else
{
...
...
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