BAEL-509: Uses @GetMapping (#2215)

* BAEL-886: Updated README

* BAEL-917 Testing with Google Truth

Updated README

* BAEL-936: adding akka-streams module to parent

* BAEL-936: Update README

* BAEL-918: Update README

* BAEL-980: Update README

* BAEL-967: Update README

* BAEL-509: Using @GetMapping instead of @RequestMapping with method=GET
This commit is contained in:
KevinGilmore 2017-07-05 22:26:04 -05:00 committed by GitHub
parent 8ea31542ed
commit a57103de78
1 changed files with 2 additions and 3 deletions

View File

@ -2,15 +2,14 @@ package com.baeldung.springsecuredsockets.controllers;
import org.springframework.security.web.csrf.CsrfToken;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
@Controller
public class CsrfTokenController {
@RequestMapping(value = "/csrf", method = RequestMethod.GET)
@GetMapping("/csrf")
public @ResponseBody
String getCsrfToken(HttpServletRequest request) {
CsrfToken csrf = (CsrfToken) request.getAttribute(CsrfToken.class.getName());