Форма Login Spring Security не могу настроить
Ковыряю Spring boot + security+ jwt. Все настроил и проверил, теперь хочу сделать форму login, но браузер пишет, что страница не найдена, ошибка 302. По документации вроде login.jsp надо положить просто в папку с представлением.
login.jsp положил в папку templates.
Я и прописать view.suffix=.jsp пытался это не помогло, вот мой файл конфигурации:
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.httpBasic().disable()
.csrf().disable()
//.formLogin().loginPage("/login.jsp").loginProcessingUrl("/people/login").failureUrl("/login?error")
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests()
.antMatchers(LOGIN_ENDPOINT).permitAll()
.antMatchers(ADMIN_ENDPOINT).hasRole("ADMIN")
.antMatchers(PEOPLE_ENDPOINT).hasRole("USER")
.anyRequest().authenticated()
.and()
.apply(new JwtConfigurer(jwtTokenProvider));
}
ссылка на проект - https://github.com/papoff8295/SpringMVCApp1/tree/dataJPA