Link Details

Program to demonstrate how to use @Component annotation for automatically configuring a Spring bean without using configuration xml file. 1. Create a class by name having @Component annotation and place it in the package 'com.hubberspot.spring.components'. This package will have our all the java files and this package entry goes into Spring frameworks configuration xml in the 'context:component-scan' tag. By providing this entry we are telling Spring container to automatically scan this package and configure the classes as components/bean

Posted by dinesh.varyani  |   Nov 15 2012 / 08:17

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Recommended Links

Written by: Ryan Knight
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Play
  3. Akka
  4. Debugging JavaScript
  5. Design Patterns
  1. Apache Hadoop
  2. REST
  3. Java
  4. Git
  5. Java Performance
Connect with DZone