@RequestMapping(value = "userRight/hasRightForOperation", method = RequestMethod.GET, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> hasRightForOperation(@PathVariable(value = "loginName") String loginName,
@PathVariable(value = "vendorId") String vendorId,
@PathVariable(value = "accessRightCode") String accessRightCode) {
return new ResponseEntity<>(hasRightForOperation(loginName, vendorId, accessRightCode), HttpStatus.OK);
You are using @PathVariable but there is no param to your url mapping.
You can fix like
@RequestMapping(value = "userRight/hasRightForOperation/{loginName}/{vendorId}/{accessRightCode}", method = RequestMethod.GET, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> hasRightForOperation(@PathVariable(value = "loginName") String loginName,
@PathVariable(value = "vendorId") String vendorId,
@PathVariable(value = "accessRightCode") String accessRightCode) {
return new ResponseEntity<>(hasRightForOperation(loginName, vendorId, accessRightCode), HttpStatus.OK);
You can change order of url mapping params. So if you dont wants in url mapping, you can get params with @RequestParam tags.
@GetMapping(value = "userRight/hasRightForOperation", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> hasRightForOperation(@RequestParam("loginName") String loginName,
@RequestParam("vendorId") String vendorId,
@RequestParam("accessRightCode") String accessRightCode) {
return new ResponseEntity<>(hasRightForOperation(loginName, vendorId, accessRightCode), HttpStatus.OK);
}