JavaBeat

  • Home
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Privacy

Spring 3 and JSR-330 Annotation : @Named and @Component Difference

November 14, 2013 by Krishna Srinivasan Leave a Comment

@Named and @Component annotations are used for the same purpose. Both the annotations are used for enabling a class to be auto detected as the bean definition for spring’s application context. The following are the main different of these two annotations. @Named is part of the. Java specification. It is more recommended since this annotation […]

Filed Under: Spring Framework Tagged With: Spring IOC

Bean Definition Inheritance in Spring

November 10, 2013 by Krishna Srinivasan Leave a Comment

In my previous post I have explained how to inherit collection values from the parent bean. Spring offers out of the box support on inheritance for the bean definitions in the XML configuration file. You can define any number of beans and extend them by using the parent  attribute in the bean element. Child bean can […]

Filed Under: Spring Framework Tagged With: Spring IOC

How to Merge Collections in Spring?

November 9, 2013 by Krishna Srinivasan Leave a Comment

In my previous post I have explained about how to use collections in Spring. This tutorial explains how to merge collections or inherit the values from the parent bean. In some scenarios we need to define a bean as abstract using the abstract=true in the bean definition. It means that another bean definition will be […]

Filed Under: Spring Framework Tagged With: Spring IOC

Spring Collections Example

November 9, 2013 by Krishna Srinivasan Leave a Comment

This tutorial explains how to use the collections API with Spring configurations. Spring provides out of the box support for all the collections classes like List, Set, Map and Properties for injecting the objects. There is a corresponding elements in the spring configuration file to pass the values to the Java objects. This tutorial passes […]

Filed Under: Spring Framework Tagged With: Spring IOC

Circular Dependency in Spring

November 9, 2013 by Krishna Srinivasan Leave a Comment

This tutorial explains one of the basic mistake done by the spring developers while defining the spring beans. Spring will not allow Circular Dependency and will throw an exception (BeanCurrentlyInCreationException) at the time of loading the configuration files. Also it is not good practice to design your project to have the circular dependency. What is […]

Filed Under: Spring Framework Tagged With: Spring IOC

How to use Initialization callback methods while creating Spring bean?

July 24, 2008 by Krishna Srinivasan Leave a Comment

Initialization callback methods Springframework provides flexibility to initialize its Beans using the user defined methods. There is some scenario where application developer want to initialize the beans properties after setting all the values. The following example program demonstrates by defining a custom method to initialize the calues. Spring’s managed bean has to implement InitializingBean from […]

Filed Under: Spring Framework Tagged With: Spring IOC

Inner beans in Spring IOC

July 21, 2008 by Krishna Srinivasan Leave a Comment

Inner beans Spring IOC allows Inner Beans declaration. We can declare a bean inside a beans. But, it has few restriction. Inner Beans are like annonymous beans where it is created and used on the fly. this beans cannot be used outside the enclosing beans. So, it is wise to avoid declaring the ‘ID‘ or […]

Filed Under: Spring Framework Tagged With: Spring IOC

Setter Injection in Spring IOC

July 21, 2008 by Krishna Srinivasan Leave a Comment

Setter Injection This article presents how to write the Setter Injection in Spring IOC. There are two types of Dependency Injection(DI) techniques we can use. 1) Setter Injection and 2) Constructor Injection. also read: Spring Tutorials Spring 4 Tutorials Spring Interview Questions As the name implies, using setter methods in a bean class the Spring […]

Filed Under: Spring Framework Tagged With: Spring IOC

Constructor Injection in Spring IOC

July 21, 2008 by Krishna Srinivasan Leave a Comment

Constructor Injection This article presents how to write the Constructor Injection in Spring IOC. There is two types of Dependency Injection(DI) techniques we can use. 1) Setter Injection and 2) Constructor Injection. also read: Spring Tutorials Spring 4 Tutorials Spring Interview Questions As the name implies, using constructor the Spring IOC container will inject the […]

Filed Under: Spring Framework Tagged With: Spring IOC

Simple example for Before advice and After Advice in Spring Framework

July 14, 2008 by Krishna Srinivasan Leave a Comment

BeforeAdvice and AfterReturningAdvice This tips presents a very simple program for invoking the Before Advice and After Returning Advice in the Spring Framework. Thsese two methods are part of Spring’s AOP implementation and used as interceptor methods. the following program create spring beans using the standalone java program and invokes the business logic method. Business […]

Filed Under: Spring Framework Tagged With: Spring IOC

  • 1
  • 2
  • Next Page »

Follow Us

  • Facebook
  • Pinterest
JavaBeat

FEATURED TUTORIALS

Servlet Life Cycle: Explanation

Servlet Life Cycle: Explanation

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

The Java 6.0 Compiler API

Copyright © by JavaBeat · All rights reserved

This website uses cookies to ensure you get the best experience on our website. Learn more.