Hello Guys as we all know that spring framework is now a day
is very popular in IT industry because of its Features and the APIs it provide
, One of them is Spring boot .
Do you know how to do Dependency Injection in Spring
Do you know how to do Dependency Injection in Spring
What is spring boot ?
Spring Boot makes it easy to create stand-alone,
production-grade Spring based Applications that you can "just run".
We take an opinionated view of the Spring platform and third-party libraries so
you can get started with minimum fuss. Most Spring Boot applications need very
little Spring configuration. (source spring.io)
Lets Quick Start with Create our first spring boot
application in java
Note : Pivotel provides custom Eclipse type IDE for Spring
projects its called as STS (Spring Tool Suit)
Objective : We are creating one project where I will create one rest endpoint to just hit the site using spring boot.
See below steps
- Provide
Name: RestDemo
Dependencies : Web
3. Now download The project
4. After download you will get the dowloaded code in zip , unzip it.
5. Open
Eclipse and Import the Project as Maven Project
6) Now Below will be the code which
you need to write in new class
7) After all this you just need to run your main class (in my case RestDemoApplication.java) as java application it will start the tomcat internally
8)Now we need to check the rest end point we have created
9)To check that we need to hit below url in browser
You will see the below spring
Congratulations you have just completed your simple Application using Spring boot!!
I hope this will help you in understanding the Complete code
I will add the code on github as well in few days.
If you like the article , please share it with your friends and colleagues.
Thanks for reading
Noeik
0 comments:
Post a Comment