Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Create a Delete Method for API : Error Method Map Undefined

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 597
    Answer it
    @DeleteMapping("/term/{id}")
     	public ResponseEntity <?> deleteTerm (@PathVariable(value="id")Long termId) {
    		return ((Object) termService.findById(Id)).map(term -> {
    			termService.delete(term);
    			return ResponseEntity.ok().build();
    		}).orElseThrow(() -> new ResourceNotFoundException("Id"+ Id+ "not found"));
    	}

    error: the method map is undefined for type object

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: