Can't create CSRF token with Spring Security

前端 未结 6 1361
清酒与你
清酒与你 2020-12-29 10:26

I am using Spring Security 3.2.3 in my Spring MVC application and getting some unexpected behavior.

According to the documentation here, it should be possible to us

6条回答
  •  一个人的身影
    2020-12-29 10:54

    In case you don't need to use Thymeleaf, I'd suggest the following:

    1. Add this to the top of your page:

      <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
      
    2. Add this to your login form:

      
      
    3. Add these dependencies to your pom.xml:

      
          org.apache.tomcat.embed
          tomcat-embed-jasper
          provided
      
      
          javax.servlet
          jstl
         
      

    After struggling a lot, that worked for me.

提交回复
热议问题