Posts

Showing posts with the label Postman

How to create Spring Boot REST Service and Test it via Postman

Image
In this blog post, I will be explaining how you can create a Spring Boot REST service.  If you would like to see how to create a basic HelloWorld Spring Boot application refer to this blog post. Edit Project Creation and Setup Step 1 – Create a new Maven Project (Refer to this blog post)   Step 2 – Add the following Spring Boot dependencies to the POM file and save. <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.2.RELEASE</version></parent><dependencies><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId></dependency></dependencies> Edit Writing Code Step 3 – Create Person class as follows package com.learnjava.model;public class Person { private int id; private String name; private int age; public int getId()...