处理问题
This commit is contained in:
parent
9767f49a06
commit
3629a314bf
@ -35,35 +35,36 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
private UserLoginService userLoginService;
|
||||
@Autowired
|
||||
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
|
||||
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[] fullAntMatchers;
|
||||
if (!StringUtils.isBlank(assetsMatchers)) {
|
||||
String[] assetsMatchersArray = baseProperties.getAssetsMatchers().split(",");
|
||||
fullAntMatchers = ArrayUtils.addAll(defaultAntMatchers, assetsMatchers);
|
||||
fullAntMatchers = ArrayUtils.addAll(defaultAntMatchers, assetsMatchersArray);
|
||||
} else {
|
||||
fullAntMatchers = defaultAntMatchers;
|
||||
}
|
||||
|
||||
LoginFailureHandler loginFailureHandler = new LoginFailureHandler(baseProperties.getLoginFailure());
|
||||
http
|
||||
.formLogin()
|
||||
|
Loading…
Reference in New Issue
Block a user