How to Create and Setup Spring Boot Project in Eclipse IDE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone in this video I am gonna show you how to quickly create and set up Springwood project in Eclipse IDE so first we'll create a spring but project using spring installation and then we'll important setup spring but project in Eclipse okay so in order to create an quickly push trap screen but project we are going to spring in July's er so open your favorite browser so I am here I just work on Chrome browser here you just type springboard initializer go to the spring would initialize a website so spring initializer is a website through which we can quickly create and bootstrap spring but project so this is the user interface how to initialize our website and spring boot is initializer provides different options here so look at here there are two types of projects Oh either you can select Marvin or Gradle so we are going to use my own projects so let's keep my own project as it is and here are the couple of languages Java code lean groovy so we are going to do a Java so let's choose our here and this is a spring boot version so let's keep default as it is because this is stable and Italy's ups playing boot and this will is recommended by spring boot team and here we have selected my main project so let us fill up this project metadata okay so let's go nuts with your group ID as comma dot playing both and artifact ID as spring both first step okay we can give any artifact ID that you want and artifact ID is nothing but our application name this is name of the project and description in package let's keep count on springboard dot tutorial now let's keep calm dot spring dot app okay and packaging as a jar so we are going to run our spring boot application in a standalone mode so let's keep our option as it is and let's keep Java 8 as and look at here this is the dependency section here basically we can select the spin move starter dependencies for example if we want to build a web application or restful web services then you can choose spring we have started dependency and you can look at here this is a description of this dependency we can use spring web starter dependency to build a web applications as well as a list of services and this spring we have started dependency provides embedded default tomcat server ok and let's pick up this dependency because we are going to create a simple restful web service to test our spring project in Eclipse ID alright and if you want to work with a hibernate or any database then you can just select here for example I am going to use Massacre then you can choose my super driver and if you want to use Postgres then just type post cache here and if you want to use hibernate engine just type spring data API dependency ok so you can choose the dependencies that are required for your spring but project okay so as up now we are going to create a simple restful web service and that's why I have just picked this one dependency that is spring we have starter dependency and you get here here are pure buttons so this is the generate button so this will generate our springboard project as a zip file and it will download anymore our local machine this is explore button we can explore our current project and this is share so we can share the project as well so let's click on explore here you can see here we can explore the different files here this way this is the pollak signal we can see what are the dependencies and how the public dot XML looks like we can also download this file to copy the content of this file and here we can also explore project structure here all right close this and we are going to generate this project as a G file so let's go and let's hit generate button so this will generate basically this will download our project as a G file on our local machine so look at here so let's go and let's open in a folder so let's go and let's extract this project alright now what we'll do we'll import this project in Eclipse IDE and go to the Eclipse IDE and in order to import the existing modern project you can either right click here and choose import or you can go to the file line you can just click on import and here just type Marvin and choose existing my project so we are going to import existing mine project browser and go to the location where we have downloaded the project in a download section this is a Springwood first app select folder and look at here pub not XML is imported and hit finish so this will import our spring project in Eclipse ID ok and this is the pound rhotic similar here you can see the required dependencies are added ok and this is the default structure of our Scrivener project and under resource folder you can see application under properties here you can configure all the application level configurations and this is our main entry point up our Springwood application so this class is annotated with at Springwood application education and this annotation internally you know provides three annotation that is add confirmation at enable auto configuration and at home for it scan and rotation ok you will learn all about these annotations and more about spring but in further videos now what we'll do we'll run this spring project in order to run this poon spring project so look at here this class has a main method so we can run this application as a java application right click and java application so look at here of a spin but project is up and running on embedded tomcat server on port 8000 okay so this is how we basically create Springwood project using supreme initializer and we import Springwood project in eclipse ide now let's quickly create a rest api and let us test our spring boot setup in eclipse ID so what we'll do is create a class here let's name it as welcome controller all right let's annotate this class with at the rate wrest control of annotation alright and let's go let's create a simple restful web service public to keep it simple i am going to return the string so let's call a method as well come here and let's annotate this net that with after it get mapping annotation so this will basically handle get HTTP method okay and here we provide our URL slash welcome okay and this will return a string like welcome to spring boot and development something like this alright so this is a pretty simple welcome a REST API which will return a welcome to spring good app development string now let's quickly go ahead and let's run the spring boat application and let us test this REST API from the browser so look at here was preamble application is up and running on embedded tomcat server on port 8000 let's go for a Chrome browser here and just type localhost:8080 and then type welcome here so look at here welcome to Springwood app development so this is the string that printed on a web page okay so this is how basically we create a springboard project using spring initializer and we import spring put project in Eclipse IDE and we have created a simple REST API to test our springboard project setup in Eclipse ID all right so you can follow the same steps I hope you found this video tutorial useful subscribe to my youtube channel whenever I will publish such videos you will get notified thanks for watching I will see you in the next video
Info
Channel: Java Guides
Views: 219,476
Rating: undefined out of 5
Keywords: springboot, spring framework, eclipse, maven
Id: ZJ7afDSrb3s
Channel Id: undefined
Length: 9min 32sec (572 seconds)
Published: Wed May 06 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.