Springboot Rest

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Day 3 Spring Frameworks Tutorial

Spring Boot application


All kinds of applications can be designed using spring boot .

For web applications spring boot provides built in web servers (tomcat) .

Spring boot is openionated .

Many things are auto configured .

Each application can have its own server


spring Boot rest
application
Makes it possible to get different data from the application based on URL used on the client side

Rest : - REpresentational state transfer

Data received from the server depends on URL

URL represents a particular page

Whenever we change URL display to a new page

Data formats :

XML format

JSON format
XML Format :

<employee>
<empId> 100 </empId>
<empName> 'saddam' </empName>
<employee>

XML file is quite bulky that’s why using JSON


JSON Format :

Java script object notation

Single Object : { "emp Id " : 10,"name" : " saddam " }

Multiple Object : [

{ "emp Id " : 10,"name" : " saddam " }

{ "emp Id " : 20,"name" : " Hussain " }

{ "emp Id " : 30,"name" : " Naveen " }

]
How to create spring boot rest application project ?

create spring boot starter project with following dependencies

spring web

dev tools

we need to create beans and controllers


spring web is using means we are seeing the data in web pages based on URL

spring boot dev tools whenever makes the changes in code we can save the code that's it automatic restart
the code without using the stopping process

This is the advantages of spring boot dev tools

You might also like