title: How to handle security.enable-csrf in Spring Boot 2?
body: <p>I'm migrating an application from Spring Boot 1.5 to 2.0.5.
  I have a property set as <code>security.enable-csrf=true</code> in 1.5 version which is not available in 2.0 version of Spring Boot.</p>
  
  <p>I read the documents and it is said that in Spring Boot 2.0:</p>
  
  <blockquote>
    <p>CSRF protection is enabled by default in the Java configuration.</p>
  </blockquote>
  
  <p>So by default it is enabled ok fine, but there is also one class created which extends <code>WebSecurityConfigurerAdapter</code> this means Spring Boot default security configuration has been turned off. Is this also means <code>security.enable-csrf</code> is disabled now?</p>
  
  <p>If yes how do I enable it like I had it in the application for 1.5 version.</p>
  
  <p>I didn't get any document which gives a clear confirmation on how to handle <code>security.enable-csrf</code> property in Spring Boot 2.0 and while declaring the <code>WebSecurityConfigurerAdapter</code>.</p>
  
  <p>Does anyone know about it? Also any document link which I have missed to read about this would be great help.</p>