дефолтная страница логина
parent
8cb50f6762
commit
b21d3a6a5b
|
@ -9,16 +9,16 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
|
|||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.security.crypto.password.NoOpPasswordEncoder;
|
||||
import ru.ldeloff.hedgehogcloud.service.UserService;
|
||||
import ru.ldeloff.hedgehogcloud.service.UserServiceImpl;
|
||||
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
UserService userService;
|
||||
UserServiceImpl userService;
|
||||
AuthenticationSuccessUserHandler authenticationSuccessUserHandler;
|
||||
|
||||
public WebSecurityConfig(UserService userService, AuthenticationSuccessUserHandler authenticationSuccessUserHandler) {
|
||||
public WebSecurityConfig(UserServiceImpl userService, AuthenticationSuccessUserHandler authenticationSuccessUserHandler) {
|
||||
this.userService = userService;
|
||||
this.authenticationSuccessUserHandler = authenticationSuccessUserHandler;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.formLogin()
|
||||
// указываем страницу с формой логина
|
||||
.loginPage("/login")
|
||||
//.loginPage("/login")
|
||||
//указываем логику обработки при логине
|
||||
.successHandler(authenticationSuccessUserHandler)
|
||||
// указываем action с формы логина
|
||||
|
|
Loading…
Reference in New Issue