Why spring and spring boot?
*Spring and Spring boot are framework.
*Spring and spring boot is used to server side program, such as insert, fetch, update and delete data from
server.
*Spring boot framework is advanced version of spring framework.
*Spring framework is used to make web application with advanced feature some of them are dependency
injection and autowireing.
*Spring boot is advanced framework of spring framework, spring boot make easy spring framework as inbuild
server, make configuration easy, and so on.
*before spring framework we write 1000 lines of code to develop web application, after spring framework 700
lines, spring boot 400 lines.
*we can develop different type of variety of application using spring and spring boot.
Web application(Spring), Rest API(Spring Boot), Full stack, microservices application
*Here some tools are there to develop spring and spring boot application.
Eclipse, Intelij
What is framework?
*framework like as template, it has predefined modules (programs) and develop environment to reduce time
for developer.
*Framework provides many advantages to the developers and reduces the time and effort required in the
development process.
,Basic concepts to spring and spring boot
1)Tight Coupling and Loose Coupling
Tight Coupling
1)eclipse installed
2)open eclipse -> create workspace(project stored directory)
3) make sure your system has good internet connection (to download class and file from online)
3)click “File” -> “new” -> “java Project”
4)open pop up window -> give the project name -> click “Next” button -> click “Finish” button.
5)right now we have project on our hand.
,How to create package:
1) Right click on “src” folder -> “New” -> “package”
2) Pop-up window opened give package name “com.techyasylum.springconcept”, new package has been
created.
3) We are going to create main class, right click on package “com.techyasylum.springconcept” -> New ->
java class.
4) Pop-up window has been opened, then give class name “AppGamingBasicJava”.
5) Then click finish button to create class, then we have created main class.
New we are going to create a class name as “GameRunner” reference screenshot below.
Now we have created required classes.
, We will write code in classes.
First run “Hello World ” statement in main class(AppGamingBasicJava)
How to run the class
1)right click on main class(AppGamingBasicJava), click “Run As” -> click “Java Application”, reference
screenshot below here.
Below output here.