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:
parent
8ea31542ed
commit
a57103de78
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue