Фильтр Spring Whitelabel Error Page

нужна помощь с фильтром Spring. Добавил springframework.security. Перестал работать фитр введите сюда описание изображения

Выдает ошибку введите сюда описание изображения

код поиска`

<form method="post" action="filter" class="form-inline my-2 my-lg-0">
                <input class="form-control mr-sm-2" type="text" name="filter" placeholder="Ключевое слово" aria-label="Search">
                <button class="btn btn-outline-danger my-2 my-sm-0" type="submit">Поиск</button>

` введите сюда описание изображения

обработчик`

@PostMapping ("filter")
    public String filter(@RequestParam String filter, Model model)
    {
        List<Post> result1 = postRepositor.findByDolzContaining(filter);
        List<Post> result2 = postRepositor.findByOptContaining(filter);
        List<Post> orResult = new ArrayList<>();
        orResult.addAll(result1);
        orResult.addAll(result2);
        model.addAttribute("posts", orResult);
        return "blog-main";
    }

` введите сюда описание изображения

Форма с добавлением соискателя тоже перестала работать`Добавление соискателя

</h1>
                <form action="/blog/add" method="post">
                    <input type = "text" name = "fio" placeholder="Введите контактную информацию" class="form-control"><br>
                    <input type = "text" name = "dolz" placeholder="Введите должность" class="form-control"><br>
                    <input type = "text" name = "tpzan" placeholder="Введите тип занятости" class="form-control"><br>
                    <input type = "text" name = "opt" placeholder="Введите опыт работы" class="form-control"><br>
                    <input type = "text" name = "educ" placeholder="Введите образование" class="form-control"><br>
                    <textarea name = "outinf" placeholder="Введите доп. информацию" class="form-control"></textarea><br>
                    <button type="sumbit" class="btn btn-secondary" href="#" role="button" >Добавить соискателя</button>
                </form>

` введите сюда описание изображения Конфиг security ``

package com.tkr.blog.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;

@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
                .authorizeRequests()
                .antMatchers("/", "/blog").permitAll()
                .anyRequest().authenticated()
                .and()
                .formLogin()
                .loginPage("/login")
                .permitAll()
                .and()
                .logout()
                .permitAll();
    }

    @Bean
    @Override
    public UserDetailsService userDetailsService() {
        UserDetails user =
                User.withDefaultPasswordEncoder()
                        .username("1")
                        .password("1")
                        .roles("USER")
                        .build();

        return new InMemoryUserDetailsManager(user);
    }
}

Ответы (1 шт):

Автор решения: Иван Кандаков

решил, добавил .csrf().disable()

→ Ссылка