Monday, July 30, 2018

Spring Boot Example of Exposing REST Service


Step1:- Downlaod STS as IDE
Step 2:- Create Spring Boot Project
rigth click -> New -- > Others -->Spring Starter Project








This will create below given project structure for you



Step 3:- Create Bean file with getter and setter method



Step 4:- Create Controller class



Step 5:- As we are using Maven we need to use following pom.xml




Step 6:- Run the project using maven build and once the jar files created execute the below command

C:\workspace-sts-3.9.4.RELEASE\spring-boot-rest\target>java -jar spring-boot-rest-0.0.1-SNAPSHOT.jar

and see hit the browser with this url

http://localhost:8083/siddhu/message?name=siddhudhumale





No comments: