filmov
tv
IOC Container, BeanFactory, Lazy & Eager Loading. Spring-Ep:2 #springframework #learnjava #bengali

Показать описание
Hi,
Hope you are all doing great. Let's learn together.
Chapters ❤
0:00 Introduction
01:32 Spring IOC Container
03:10 What is Bean
03:22 Type Of IOC Container
03:32 BeanFactory Container
04:29 Code Implementation
10:56 APIs of BeanFactory
11:21 getBean()
11:35 containsBean()
12:42 isSingleton()
13:58 isPrototype()
14:48 getAliases()
17:20 XmlBeanFactory class is deprecated
19:18 Lazy Loading vs. Eager Loading
Document Link :
Note:
Spring is a lightweight framework. It was developed by Rod Johnson in 2003. Spring framework makes the easy development of the JavaEE application.
Spring Video Links :
Java Video Links:
Core Java Playlist:
Like, Comment, Share, and Subscribe.
Thank you again.
STS Link:
JDK Link:
To download spring jars
Spring IOC Container
Spring IoC Container is the core of Spring Framework. It creates the objects, configures and assembles their dependencies, and manages their entire life cycle. The Container uses Dependency Injection(DI) to manage the components that make up the application. It gets the information about the objects from a configuration file(XML) or Java Code or Java Annotations and Java POJO class. These objects are called Beans.
Bean
In Spring, the objects that are managed by the Spring IoC container are called Beans.
Spring provides two types of Containers namely
BeanFactory Container
ApplicationContext Container
BeanFactory Container
BeanFactory represents a basic IoC container which is a parent interface of ApplicationContext.BeanFactory uses Beans and their dependencies metadata to create and configure them at run-time.
*For accessing a resource from the classpath, we can simply use ClassPathResource.
Let's discuss some of its important APIs.
1. The getBean() API
Various versions of the getBean() method return an instance of the specified bean, which may be shared or independent across the application.
2. The containsBean(String name) API
This method confirms if this bean factory contains a bean with the given name.
3.The isSingleton(String name) API
4. The isPrototype(String name) API
5. The getAliases(String name) API
Return the aliases for the given bean name, if any.
Note: XmlBeanFactory class is deprecated.
Lazy Loading vs. Eager Loading
BeanFactory(XmlBeanFactory) loads beans on-demand, while ApplicationContext loads all beans at startup. Thus, BeanFactory is lightweight as compared to ApplicationContext.
lazy-init="true"
Hope you are all doing great. Let's learn together.
Chapters ❤
0:00 Introduction
01:32 Spring IOC Container
03:10 What is Bean
03:22 Type Of IOC Container
03:32 BeanFactory Container
04:29 Code Implementation
10:56 APIs of BeanFactory
11:21 getBean()
11:35 containsBean()
12:42 isSingleton()
13:58 isPrototype()
14:48 getAliases()
17:20 XmlBeanFactory class is deprecated
19:18 Lazy Loading vs. Eager Loading
Document Link :
Note:
Spring is a lightweight framework. It was developed by Rod Johnson in 2003. Spring framework makes the easy development of the JavaEE application.
Spring Video Links :
Java Video Links:
Core Java Playlist:
Like, Comment, Share, and Subscribe.
Thank you again.
STS Link:
JDK Link:
To download spring jars
Spring IOC Container
Spring IoC Container is the core of Spring Framework. It creates the objects, configures and assembles their dependencies, and manages their entire life cycle. The Container uses Dependency Injection(DI) to manage the components that make up the application. It gets the information about the objects from a configuration file(XML) or Java Code or Java Annotations and Java POJO class. These objects are called Beans.
Bean
In Spring, the objects that are managed by the Spring IoC container are called Beans.
Spring provides two types of Containers namely
BeanFactory Container
ApplicationContext Container
BeanFactory Container
BeanFactory represents a basic IoC container which is a parent interface of ApplicationContext.BeanFactory uses Beans and their dependencies metadata to create and configure them at run-time.
*For accessing a resource from the classpath, we can simply use ClassPathResource.
Let's discuss some of its important APIs.
1. The getBean() API
Various versions of the getBean() method return an instance of the specified bean, which may be shared or independent across the application.
2. The containsBean(String name) API
This method confirms if this bean factory contains a bean with the given name.
3.The isSingleton(String name) API
4. The isPrototype(String name) API
5. The getAliases(String name) API
Return the aliases for the given bean name, if any.
Note: XmlBeanFactory class is deprecated.
Lazy Loading vs. Eager Loading
BeanFactory(XmlBeanFactory) loads beans on-demand, while ApplicationContext loads all beans at startup. Thus, BeanFactory is lightweight as compared to ApplicationContext.
lazy-init="true"
Комментарии