master
parent
35cf0df44e
commit
8fc4348b93
|
|
@ -27,11 +27,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests()
|
||||
.antMatchers("/statics/**", "/v2/api-docs/**", "/swagger-resources/**", "/swagger-ui.html",
|
||||
"/webjars/**")
|
||||
.permitAll().anyRequest().authenticated().and().formLogin().loginProcessingUrl("/login")
|
||||
.successHandler(authenticationSuccessHandler).failureHandler(authenticationFailureHandler).and()
|
||||
.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler).and().csrf().disable();
|
||||
.antMatchers("/login.html", "/statics/**", "/v2/api-docs/**", "/swagger-resources/**",
|
||||
"/swagger-ui.html", "/webjars/**")
|
||||
.permitAll().anyRequest().authenticated().and().formLogin().loginPage("/login.html")
|
||||
.loginProcessingUrl("/login").successHandler(authenticationSuccessHandler)
|
||||
.failureHandler(authenticationFailureHandler).and().logout().logoutUrl("/logout")
|
||||
.logoutSuccessHandler(logoutSuccessHandler).and().csrf().disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@
|
|||
parent.location.href = '/login.html';
|
||||
}
|
||||
|
||||
var user = loginInfo();
|
||||
/* var user = loginInfo();
|
||||
if (user != "") {
|
||||
location.href = '/';
|
||||
}
|
||||
} */
|
||||
|
||||
function login(obj) {
|
||||
$(obj).attr("disabled", true);
|
||||
|
|
@ -54,9 +54,10 @@
|
|||
} else {
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '/sys/login',
|
||||
url : '/login',
|
||||
data : $("#login-form").serialize(),
|
||||
success : function() {
|
||||
success : function(data) {
|
||||
console.log(data)
|
||||
location.href = '/';
|
||||
},
|
||||
error : function(xhr, textStatus, errorThrown) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue