
Search In
@Bean Annotation in Spring: @Bean is used to register a bean in spring container. There are two kind of configuration we can do in Spring Framework, one is using the xml bean configuration file and second is using the java configuration file. Here we
In below Code you have to define the following log4j properties into your log.properties file:-
log4j.properties
# Global logging configuration
log4j.rootLogger = DEBUG, fileout
# Define the file appender
log4j.appender.fileout=org
Using Custom Scopes, we can define new scope as well as modify the existing scope.
Custom Scope is useful for following scenarios-
creating a bean scope where beans can be shared between servlet contexts
creating a bean scope where beans can be s
Hello Guys
ApplicationContext is manages complete life cycle of the beans in spring application. The ApplicationContext publishes many types of events when loading the beans.
For example:
ContextRefreshedEvent : It is published when the ApplicationCo
ApplicationContextAware Interface : Like in every web applications, we can also use application context in Spring Framework. Spring Framework provide this object in a different way. One way is that, to create new instance every time when you need the
dependsOn attribute for loading the depended beans referenced by another bean. dependsOn is a bean tag that can indicate bean depends on another bean .
In this Example we can see when ApplicationContext Container is initialize first it will i
dependsOn attribute for loading the depended beans referenced by another bean. dependsOn is a attribute as part of the bean tag and it takes the comma separated bean names which are loaded before the actual bean is instantiated.
In this Example we c
Introduction to Spring 3 MVC Framework
The Spring web MVC framework provides model-view-controller architecture and ready components that can be used to develop flexible and loosely coupled web applications. The MVC pattern allow us in separating t
BeanFactory VS ApplicationContext:- The Both BeanFactory and ApplicationContext can initialize the Spring IOC Container. They Both are Java Interfaces and ApplicationContext can extends the BeanFactory. BeanFactory Inteface can only provide basic IOC
@Transactional Annotation in Spring:- A transaction is unit of work that have ACID (atomicity, consistency, isolation and durability) properties.
Atomicity:- this means that the changes will completely happens or not. for example If money is debite