处理问题
This commit is contained in:
parent
9767f49a06
commit
3629a314bf
@ -35,35 +35,36 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
private UserLoginService userLoginService;
|
private UserLoginService userLoginService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PasswordEncoder passwordEncoder;
|
private PasswordEncoder passwordEncoder;
|
||||||
/**
|
|
||||||
* 默认放行配置
|
|
||||||
*/
|
|
||||||
private String[] defaultAntMatchers = {
|
|
||||||
baseProperties.getLoginUrl(),
|
|
||||||
baseProperties.getLoginProcess(),
|
|
||||||
baseProperties.getLoginFailure(),
|
|
||||||
"/oauth/**",
|
|
||||||
"/oauth_client/**",
|
|
||||||
"/app/**",
|
|
||||||
"/approute/**",
|
|
||||||
"/wechat/**",
|
|
||||||
"/wechat/route/**",
|
|
||||||
"/wechat-miniapp/**",
|
|
||||||
"/route/file/**",
|
|
||||||
"/api/sms/getverificationcode/*",
|
|
||||||
"/api/user/getsignintype/**"
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
|
/**
|
||||||
|
* 默认放行配置
|
||||||
|
*/
|
||||||
|
String[] defaultAntMatchers = {
|
||||||
|
baseProperties.getLoginUrl(),
|
||||||
|
baseProperties.getLoginProcess(),
|
||||||
|
baseProperties.getLoginFailure(),
|
||||||
|
"/oauth/**",
|
||||||
|
"/oauth_client/**",
|
||||||
|
"/app/**",
|
||||||
|
"/approute/**",
|
||||||
|
"/wechat/**",
|
||||||
|
"/wechat/route/**",
|
||||||
|
"/wechat-miniapp/**",
|
||||||
|
"/route/file/**",
|
||||||
|
"/api/sms/getverificationcode/*",
|
||||||
|
"/api/user/getsignintype/**"
|
||||||
|
};
|
||||||
String assetsMatchers = baseProperties.getAssetsMatchers();
|
String assetsMatchers = baseProperties.getAssetsMatchers();
|
||||||
String[] fullAntMatchers;
|
String[] fullAntMatchers;
|
||||||
if (!StringUtils.isBlank(assetsMatchers)) {
|
if (!StringUtils.isBlank(assetsMatchers)) {
|
||||||
String[] assetsMatchersArray = baseProperties.getAssetsMatchers().split(",");
|
String[] assetsMatchersArray = baseProperties.getAssetsMatchers().split(",");
|
||||||
fullAntMatchers = ArrayUtils.addAll(defaultAntMatchers, assetsMatchers);
|
fullAntMatchers = ArrayUtils.addAll(defaultAntMatchers, assetsMatchersArray);
|
||||||
} else {
|
} else {
|
||||||
fullAntMatchers = defaultAntMatchers;
|
fullAntMatchers = defaultAntMatchers;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoginFailureHandler loginFailureHandler = new LoginFailureHandler(baseProperties.getLoginFailure());
|
LoginFailureHandler loginFailureHandler = new LoginFailureHandler(baseProperties.getLoginFailure());
|
||||||
http
|
http
|
||||||
.formLogin()
|
.formLogin()
|
||||||
|
Loading…
Reference in New Issue
Block a user