Link Details

Link 877507 thumbnail
User 1071287 avatar

By dinesh.varyani
Published: Nov 15 2012 / 08:17

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
  • 5
  • 1
  • 937
  • 719

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.

Voters For This Link (5)

Voters Against This Link (1)

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java