refactor: remove usage of RequestMapping
				
					
				
			This commit is contained in:
		| @ -29,8 +29,7 @@ import java.util.Random; | ||||
| import org.owasp.webgoat.container.i18n.PluginMessages; | ||||
| import org.owasp.webgoat.container.session.UserSessionData; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.RequestMapping; | ||||
| import org.springframework.web.bind.annotation.RequestMethod; | ||||
| import org.springframework.web.bind.annotation.PostMapping; | ||||
| import org.springframework.web.bind.annotation.ResponseBody; | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
|  | ||||
| @ -41,10 +40,9 @@ public class CSRFGetFlag { | ||||
|   @Autowired UserSessionData userSessionData; | ||||
|   @Autowired private PluginMessages pluginMessages; | ||||
|  | ||||
|   @RequestMapping( | ||||
|   @PostMapping( | ||||
|       path = "/csrf/basic-get-flag", | ||||
|       produces = {"application/json"}, | ||||
|       method = RequestMethod.POST) | ||||
|       produces = {"application/json"}) | ||||
|   @ResponseBody | ||||
|   public Map<String, Object> invoke(HttpServletRequest req) { | ||||
|  | ||||
|  | ||||
| @ -29,9 +29,8 @@ import lombok.extern.slf4j.Slf4j; | ||||
| import org.owasp.webgoat.container.session.WebSession; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.beans.factory.annotation.Value; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||
| import org.springframework.web.bind.annotation.RequestHeader; | ||||
| import org.springframework.web.bind.annotation.RequestMapping; | ||||
| import org.springframework.web.bind.annotation.RequestMethod; | ||||
| import org.springframework.web.bind.annotation.RequestParam; | ||||
| import org.springframework.web.bind.annotation.ResponseBody; | ||||
|  | ||||
| @ -43,7 +42,7 @@ public class Ping { | ||||
|  | ||||
|   @Autowired private WebSession webSession; | ||||
|  | ||||
|   @RequestMapping(method = RequestMethod.GET) | ||||
|   @GetMapping | ||||
|   @ResponseBody | ||||
|   public String logRequest( | ||||
|       @RequestHeader("User-Agent") String userAgent, @RequestParam(required = false) String text) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user