@RequestMapping(value = "/config", method = RequestMethod.POST) public ResponseEntity<Map<String, String>> postConfig(@RequestBody Map<String, String> map) throws ServletException { filter.refresh(map); Map<String, String> hashMap = new HashMap<String, String>(); hashMap.put("success", "success update cors filter config"); return new ResponseEntity<Map<String, String>>(hashMap, HttpStatus.OK); }
@RequestMapping(value = "/config", method = RequestMethod.GET) public ResponseEntity<Map<String, String>> getConfig() { return new ResponseEntity<Map<String, String>>(filter.getConfig(), HttpStatus.OK); }