"Error: HttpStatus cannot be resolved by a variable" How to solve this problem?

I get the error below the code in line 2: @ResponseStatus(HttpStatus.OK) . Error: " HttpStatus could not be resolved to a variable ." What imports are required for this? Am I missing any necessary jar file? Any help?

 @RequestMapping( value = "/{id}", method = RequestMethod.GET ) @ResponseStatus(HttpStatus.OK) @ResponseBody public String validateUser( @PathVariable( "id" ) String id){ Return "User Validated" } 
+5
source share
1 answer

Add

 import org.springframework.http.HttpStatus; 
+11
source

All Articles