Simple example of Spring Security with Thymeleaf

前端 未结 5 457
感情败类
感情败类 2020-12-25 14:57

hi I\'m trying to follow a simple example about doing a simple login form page that i found in this page http://docs.spring.io/autorepo/docs/spring-security/4.0.x/guid

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-25 15:36

    Worked for me only after added the following:

    protected void configure(HttpSecurity http) throws Exception {
        ...
    
        http.csrf().csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse());
        ...
    }
    

提交回复
热议问题