spring url parameter
@RequestMapping("/{someID}")
public @ResponseBody int getAttr(@PathVariable(value="someID") String id,
@RequestParam String someAttr) {
}
spring url parameter
@RequestMapping("/{someID}")
public @ResponseBody int getAttr(@PathVariable(value="someID") String id,
@RequestParam String someAttr) {
}
postmapping mulitple params same name in spring boot
@RequestMapping(value="/params", method = RequestMethod.GET)
public ResponseEntity getParams(@RequestParam Map<String, String> params ) {
System.out.println(params.keySet());
System.out.println(params.values());
return new ResponseEntity<String>("ok", HttpStatus.OK);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us