Skip to content

varghese25/Spring_boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Notes

##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

  1. Avido tight coupling
  2. Achieved by @component , @autowired @qualifer
  3. 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)

  1. Give Default Project Structure
  2. Depenedencies Auto download
  3. Auto Complie
  4. 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

Bean: Object in class create as a (Bean) of object Home.Class) in the spring Container.

https://www.youtube.com/watch?v=vq7eTSapdv0&list=PLgWpUXNR_WCc_VontznRnCUdul5Zp1x3c&index=3 (35:55)

1. Singleton Scope

2. Prototype Scope : If we create mutiple Object its called Prototype Scope.

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

 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages