Spring Boot - @RestController Easy way for creating your REST web service
Building web services with Spring boot is quite simple, you basically have to annotate a java class with @RestController annotation. @RestController public class ContactService { } Then, some methods of this class can be annotated with @RequestMapping, which indicates this method could be triggered by a HTTP request to the server, once it has match the defined path/URI. @RequestMapping (value = "/contact" , method=RequestMethod. GET ) String list() { return "listing all contacts...." ; } Now, it is also possible to set additional parameters to be received by http requests. For this purpose we can use @PathVariable annotation, which may bind a URL parameter with a method parameter. In the value attribute of @RequestMapping annotation, you may use the {variableName} for representing Where the value will be replaced by values in the concreate use case of the REST call. You may see an example of this code below: @R...