By dinesh.varyani
via hubberspot.com
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 Side.java 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
Add your comment