Hi,
Hope you are all doing great. Let's learn together.
Join Telegram: 📲 https://t.me/contactajoydebnath
Chapters ❤
0:00 Introduction
00:27 @Configuration & @Bean
02:00 @Configuration & @Bean Code implementation
08:13 @Component & @ComponentScan
11:01 @Component & @ComponentScan Code implementation
16:57 What if I remove the @Configuration annotation
Note:
Spring is a lightweight framework. It was developed by Rod Johnson in 2003. Spring framework makes the easy development of JavaEE applications.
Spring Video Links --
IOC, Dependency Injection, IOC Container, Coupling. -- • IOC,Dependency Injection,IOC Container,Cou...
IOC Container, BeanFactory, Important APIs, Lazy & Eager Loading. -- • IOC Container, BeanFactory, Lazy & Eager L...
Bean Scope, Sinton Scope, and Prototype Scope. -- • Bean Scope, Singleton Scope, and Prototype...
Autowiring, Autowiring Modes - byName, byType & constructor. -- • Autowiring, Autowiring Modes - byName, byT...
@Configuration, @Bean, @Component, @ComponentScan in Spring. -- • @Configuration, @Bean, @Component, @Compon...
What if we remove the @Configuration annotation in Spring? -- • What if we remove the @Configuration annot...
Spring JDBCTemplate, JDBC, Statement, and PreparedStatement -- • Spring JDBCTemplate, JDBC, Statement and P...
JDBCTemplate, RowMapper, ResultSetExtractor, BeanPropertyRowMapper Spring -- • JDBCTemplate, RowMapper,ResultSetExtractor...
Model-View-Controller(MVC), Spring MVC. -- • Model-View-Controller(MVC), Spring MVC. Sp...
Spring MVC with JSP (Java server Page). -- • Spring MVC with JSP (Java server Page). S...
Spring MVC with JSP (Java server Page). -- • Spring MVC with JSP (Java server Page). Sp...
Java Playlist --
Factory Method Design Pattern. -- • Factory Method Design Pattern. Bengali-Ep:...
Stream API: Intermediate & Terminal operations. -- • Stream API: Intermediate & Terminal operat...
Stream API: Intermediate & Terminal operations. -- • Stream API : Intermediate & Terminal opera...
Guide To Java 8 Optional Class. Part-I. -- • Guide To Java 8 Optional Class. Part-I. Be...
Guide To Java 8 Optional Class. Part-II. -- • Guide To Java 8 Optional Class. Part-II Be...
Lambda Expression, Functional Interfaces, Anonymous Class. -- • Lambda Expression, Functional Interfaces, ...
Exception, Exception Hierarchy, Call Stack, Propagation. -- • Exception, Exception Hierarchy, Call Stack...
Exception, try, catch, finally. -- • Exception, Propagation try, catch, finally...
Exception, Custom Exception, throw, throws. -- • Exception, Custom Exception, throw, throws...
Object Cloning, Shallow Copy, and Deep Copy. -- • Object Cloning, Shallow Copy, and Deep Cop...
How to create an Immutable class in Java? Immutable Design Pattern. -- • How to create Immutable class in Java? Imm...
Document Link -
https://docs.google.com/document/d/1V...
Like, Comment, Share, and Subscribe.
Thank you again.
STS Link:
https://spring.io/tools
JDK Link:
https://www.oracle.com/java/technolog...
To download spring jars
https://repo.spring.io/ui/native/rele...
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.
@Configuration
Spring @Configuration annotation helps in Spring annotation-based configuration. @Configuration annotation indicates that a class declares one or more @Bean methods.
@Bean
@Bean annotation which is applied on a method to specify that it returns a bean to be managed by Spring context.
Spring Bean annotation is usually declared in Configuration classes methods.
**In Spring, the objects that are managed by the Spring IoC container are called Beans.
@Component
@Component is an annotation that allows Spring to automatically detect our beans.
In other words, without having to write any explicit code, Spring will:
Scan our application for classes annotated with @Component
Instantiate them and inject any specified dependencies into them
Inject them wherever needed
@ComponentScan
We use the @ComponentScan annotation along with the @Configuration annotation to specify the packages that we want to scan for annotated components. @ComponentScan without arguments tells Spring to scan the current package and all of its sub-packages.