title: Injecting specific bean to DAO using Spring profile
body: <p>In my webapplication there are two datasource beans in the applicationContext one is to be used for real-env and one is to be used for execution of test. The dataSource objects is injected in one DAO class. Using Spring profile how can I configure test dataSource should be injected in the DAO while running Test (JUnit) and real-env dataSource should be injected in the DAO while code deployed to real-env ?</p>