Running_NoteS
Running_NoteS
======
https://github.com/kolaparthi34k/ZetaGloballHydTraining
https://github.com/kolaparthisrini
https://skolaparthi.com
Java Versions:
1.8
legacy--->1.6
Jenkins---->1.17,1.20,1.21,1.11
Kubernats---->=1.8
Spring STS===>1.11/1.17/1.20
Spring STS 4.0/VS code--sts
>>>>>>>>>>>>>>>>>>>>>
>>>>>JAVA
Fund transfer---NEFT,UPI,SWIFT
Orchestration
NEFT App
UPI app
Swift
Target audience
Interfaces
Abstract classes
Concrete classes
================>
datatypes:type of data
data----1,q,`,f
processing
Information------------>
>>>>>>>>>>>>>
3.14563---64bit,32bit
strictfp
DDOS--_C
JAVA-
Structured Programming int
Serialization: process of saving SBI of an object to storage like
file/database/webservices temporarl.
>>Collections
>>>SBI
Variable arguments
>>if we need to create multiple constants,dont use Classes.Use Enum classes.
interface A
{
}----marker interfaces
interface B
{
public void dd();
}---normal interface
=====
Define console appender
log4j.appender.console=org.apache.log4j.ConsoleAppender
logrj.appender.console.Target=System.out
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%-5p %c{1} - %m%n
================
Rules for Method Overiding:
===========================
>he argument list should be exactly the same as that of the overridden method.
The return type should be the same or a subtype of the return type declared in the
original overridden method in the superclass.
The access level cannot be more restrictive than the overridden method's access
level. For example: If the superclass method is declared public then the overriding
method in the subclass cannot be either private or protected.
Instance methods can be overridden only if they are inherited by the subclass.
A method declared final cannot be overridden.
A method declared static cannot be overridden but can be re-declared.
If a method cannot be inherited, then it cannot be overridden.
A subclass within the same package as the instance's superclass can override any
superclass method that is not declared private or final.
A subclass in a different package can only override the non-final methods declared
public or protected.
An overriding method can throw any uncheck exceptions, regardless of whether the
overridden method throws exceptions or not. However, the overriding method should
not throw checked exceptions that are new or broader than the ones declared by the
overridden method. The overriding method can throw narrower or fewer exceptions
than the overridden method.
Constructors cannot be overridden.
>Any class which is declared as final cannot be inherited.
>A class can be private only in inner classes.
>parent/base/super class
>child or sub or derived class
Ambani------>e-commerce---Mobiles----->Mobile app
December 2023
Business Analyst
==================
Annotation:
The annotation-config is configured in Spring XML configuration. The annotation-
config activates various annotations to be detected in bean classes. It is
configured in XML configuration as following.
<context:annotation-config/>
The annotation-config activates following annotations in bean classes.
1. Spring @Required and @Autowired annotations.
2. JSR 250 @PostConstruct, @PreDestroy and @Resource annotations.
3. JAX-WS @WebServiceRef annotation.
4. EJB 3 @EJB annotation.
5. JPA @PersistenceContext and @PersistenceUnit annotations.
Scope:
singleton � Scopes a single bean definition to a single object instance per Spring
IoC container.
prototype � Return a new bean instance each time when requested
request � Return a single bean instance per HTTP request.
session � Return a single bean instance per HTTP session.
globalSession � Return a single bean instance per global HTTP session.
=======
>>Autowiring:
No. Mode Description
1) no It is the default autowiring mode. It means no autowiring bydefault.
2) byName The byName mode injects the object dependency according to name
of the bean. In such case, property name and bean name must be same. It internally
calls setter method.
3) byType The byType mode injects the object dependency according to type.
So property name and bean name can be different. It internally calls setter method.
4) constructor The constructor mode injects the dependency by calling the
constructor of the class. It calls the constructor having large number of
parameters.
5) autodetect It is deprecated since Spring 3.
>>>>>Design patterns
goals:
clean
install
deploy
==========================
MVC Flow:
===========
1)Client requests for a page by specifying the Web URL for the page. E.g.
https://skolaparthi.com
2)Client request is intercepted by the Dispatcher Servlet also known as Front
Controller. Dispatcher Servlet is a servlet specified in Web.XML file (for XML
Based configurations) or in the Web Configuration class (for java based
configurations).
3)Dispatcher Servlet uses URL Mapping Handler to find out the relevant controller
class to which request should be passed for subsequent processing. For example, If
you have a Controller defined for all requests by specifying �/� in the URL, all
requests will be entertained by that controller.
4)Once Dispatcher Servlet has identified the Controller to be considered, it passes
the client request to the controller.
5)The controller class is the main class controlling the business logic flow once
request has been dispatched it it by dispatcher servlet. This class will implement
the methods for different type of http requests (e.g. GET, POST) and all logic to
call Service layer methods will reside in this controller class.
6)The controller class will also be responsible for returning the ModelAndView
object back to the dispatcher servlet after getting all business logic executed and
any data returned from DAO layer. ModelAndView object returned by the controller
back to the controller specified both view and model objects.
7)After receiving ModelAndView object from the controller, Dispatcher Servlet now
sends model object to view resolver to get the name of the view which needs to be
rendered.
8)Once the view to be rendered has been identified, Dispatcher Servlet passes model
object to the view. Model object contains the data which needs to be displayed in
the view. View will be rendered with the model data. Views can be designed in any
front-end technology.
9)This view is returned to the client and client can see the view and associated
data on his browser.
3-Oct-2023
==========
>@Repository Annotation is used to indicate that the class provides the mechanism
for storage, retrieval, update, delete and search operation on objects.
>
Springboot is mainly used for Designing Cloud based applications and Microservice
app development.
Freemarker
@Repository,@Service,@RestController,@ComponentScanning,@Controller
>>
It is very easy to develop Spring Based applications with Java or Groovy.
It reduces lots of development time and increases productivity.
It avoids writing lots of boilerplate Code, Annotations and XML Configuration.
It is very easy to integrate Spring Boot Application with its Spring Ecosystem like
Spring JDBC, Spring ORM, Spring Data, Spring Security etc.
It follows �Opinionated Defaults Configuration� Approach to reduce Developer effort
It provides Embedded HTTP servers like Tomcat, Jetty etc. to develop and test our
web applications very easily.
It provides CLI (Command Line Interface) tool to develop and test Spring Boot(Java
or Groovy) Applications from command prompt very easily and quickly.
It provides lots of plugins to develop and test Spring Boot Applications very
easily using Build Tools like Maven and Gradle
It provides lots of plugins to work with embedded and in-memory Databases very
easily.
>>
@Controller -> Classes annotated with this, are intended to receive a request from
the client side. The first request comes to the Dispatcher Servlet, from where it
passes the request to the particular controller using the value of @RequestMapping
annotation.
@Service -> Classes annotated with this, are intended to manipulate data, that we
receive from the client or fetch from the database. All the manipulation with data
should be done in this layer.
@Repository -> Classes annotated with this, are intended to connect with database.
It can also be considered as DAO(Data Access Object) layer. This layer should be
restricted to CRUD (create, retrieve, update, delete) operations only. If any
manipulation is required, data should be sent be send back to @Service layer.
>>In springboot ,Spring application class will boostrap(loader) the current class
as per the loading strategy(lazy,early).