##Controller - Model - View
Controller through contacting model through viewing things
Payilagam 39 mints watch videos Spring boot introduction video above MVC
Dependency Injection example (Video 2)
Class Home
Net connection Modem,
{
@Auto wired
@Component
@Qualifier(BSNL or Airtel))// using it we can decided which connection
Home h = New Home(); // it's hard Cording
}
InterFace net connection
{
}
@Component(BSNL) // default spring container it will create in JVM BSNL also for Airtel depend how class we create and object
Class BSNL implement net connection
{
}
@Component(Airtel)
Class Airtel implement net connection
{
}
// External service like @Component BSNL and @Component Airtel any service can be used through (class Home @component @ Auto Wired) I can connect internet
Injecting object to other object
- Avido tight coupling
- Achieved by @component , @autowired @qualifer
- unit testing will be easier
One Class Object place in another class without tight coupling @Component, @AutoWired, Called Dependancy Injection
##ServerConfiguration are inBuilt its Auto Configuration like Apace TomCat
##Maven Configuration Management Tool< br>
InBuild in SpringBoot
No WAR Files / JAR Files (MVN Repository Available according our Need )
Maven is German Word knowledge Accumlator
Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
Oracle Jar File is Java Class File
MySQL JAR --> Version is required for MAVEN
XLS JAR
POM -> JAR
https://repo1.maven.org/maven2/
MAVEN (Strength)
- Give Default Project Structure
- Depenedencies Auto download
- Auto Complie
- Server Stop & Start
C:\Users\u.m2\repository ## It local Repository were i can see Maven Details POM Details
local Laptop path for Maven
STS & Ecplise
1)Group ID means -> Package Name
2) ArtiFact ID means-> Project Name
3) Version ID
STS Basic things to build a Maven Project
Spring Dependancy Injection
Spring Web - For Web Application
Thyme Leaf - For Front End
JPA - Spring Data JPA
Spring Boot Actuator - For Debuging
##Core Java -> .class Java
##Advance Java WebApplication -> WAR Files has lot of class WAR
POJO Classes (Plain Old Java Object) which use Getter & Setter Which use like Private Variables
Package com.example.demo;
public class Home {
//POJO Classes
private String
Spring Create only one Object. It wont call uncessary object that why it is called Single Ton Project
https://www.youtube.com/watch?v=vq7eTSapdv0&list=PLgWpUXNR_WCc_VontznRnCUdul5Zp1x3c&index=3 (35:55)
Bean object
// Bean of object Home.Class
Home h = Context.getBean(Home.Class)
h.connect(); // Object in Home Class
Home h = Context.getBean(Home.Class)
h.connect(); Object in Home Class
}
}
OutPut
Home Home
Connect Internet
Connect Internet