I have created demo Spring Boot project and implemented Restful services as shown here
@RestController
public class GreetingsController {
@RequestMapping(value="/api/greetings", method=RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> getGreetings(){
return new ResponseEntity<String>("Hello World", HttpStatus.OK);
}
}
When I tried to invoke the service with Postman tool with url "http://localhost:8080/api/greetings" as request method GET, I am getting below error message
{
"timestamp": 1449495844177,
"status": 404,
"error": "Not Found",
"message": "No message available",
"path": "/api/greetings"
}
Per Spring Boot application, I don't have to configure the Spring Dispatcher servlet in web.xml.
Can someone help me to find out the missing point here?