Uses
* Updated README
* Testing with Google Truth
Updated README
* adding akka-streams module to parent
* Update README
* Update README
* Update README
* Update README
* Using instead of with method=GET
@@ -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());
