Hi welcome to Red Stapler. In this tutorial I'm going to cover about spring boot
spring boot is actually a spring framework with simplified setting and
automated configuration which allows you to get your development project up and
running rapidly. So in this video I'm going to show you how to create a simple
hello world application with spring boot in just a couple of minutes. First let's prepare
our development environment make sure you already have the latest version of
JDK installed. You can check the Java version by open the command prompt and
type java -version for this tutorial I have version 8 installed. Number two pick
your IDE of choice in this tutorial I'm going to use Spring Tool Suite which is a
customized version of Eclipse for the spring application. You can download it
from spring official site. Of course you can always use the original version of
Eclipse and download the required plugin if needed but for the sake of
simplicity I'm going to use spring tool suite for this tutorial. Now once you
download the Spring tool suite and unzip the file here's what you get so let's
start the Spring tool suite
and got to pick the workspace
now you can see it almost looks exactly like eclipse so those who familiar with
Eclipse should have no problems with the spring tool suite so let's start the
development by create a new project in this tutorial I'm going to use a maven
project Don't worry for those of you who not
familiar with the maven I'm going to cover about that in a few videos so for
now let's create a simple maven project and click Next. Now for the naming I'm
going to use the reversal of the official site as a group ID and for
artifact ID I'm going to use project name so let's go with the springbootdemo
and use that as a project name for the description I'm going to put Spring Boot Tutorial
hello world and click Finish
now the project is ready the next step I'm going to define the project
dependency in a pom.xml the pom.xml is the XML that define all the
dependencies of your project for maven so whatever the library or any dependency
you need you just put it in here and maven will automatically download it to
the local workspace so for the list of dependencies for this project I'm going
to use the information provided on a QuickStart section on the official site
so let's copy the code and place it inside the project tag
now our project will have all the required dependencies for the hello
world application unfortunately I happen to have a build
problems with the version 1.5.4 of the spring boot so I'm going to switch
to 1.5.2 instead and save the pom.xml and update maven setting now
you see this is the benefit of using maven all you have to do when you want
to switch the version is to edit the pom.xml and maven you do the rest
to download the required dependency so now we almost have everything that we
need except one, the main class. Again I'm going to use information provided on
quick start section on official side
under the src/main/java let's create a new class and name it SpringBootDemo
finish and paste the information copy from the official site and rename the
class name to SpringBootDemo
okay alright we are ready next let's run the project
if everything's goes smoothly you see the start springbootdemo as the
last line on the console all right now I'm opening a web browsers
let's type localhost with port 8080 which is the default
listening port for tomcat of course you can change that later but for now let's go with default
Hello world!! I know there's still lots of
details to talk about but I hope this tutorial should give you some ideas to
get a feel of Spring Boot! stay tuned for more videos soon and don't forget to
like or subscribe if you think this video helps - bye bye