How use Application context in core application:-
ApplicationContext context =
new ClassPathXmlApplicationContext("applicationContext.xml");
//System.out.println( context.getBean("AutowiredBeansDetail") );
AutowireCapableBeanFactory acbf = context.getAutowireCapableBeanFactory();
acbf.autowire(AutowiredBeansDetail.class, acbf.AUTOWIRE_CONSTRUCTOR, true);
acbf.autowireBean(AutowiredBeansDetail.class);
AutowiredBeansDetail autowiredBeansDetail = acbf.getBean(AutowiredBeansDetail.class);
List<Songs> downloadable = autowiredBeansDetail.getSongsService().getDownloadableSongs ("s1,s2");
for(Games dgmlist : downloadableSongsList) {
System.out.println(dgmlist.getSongid());
}
ApplicationContext context =
new ClassPathXmlApplicationContext("applicationContext.xml");
//System.out.println( context.getBean("AutowiredBeansDetail") );
AutowireCapableBeanFactory acbf = context.getAutowireCapableBeanFactory();
acbf.autowire(AutowiredBeansDetail.class, acbf.AUTOWIRE_CONSTRUCTOR, true);
acbf.autowireBean(AutowiredBeansDetail.class);
AutowiredBeansDetail autowiredBeansDetail = acbf.getBean(AutowiredBeansDetail.class);
List<Songs> downloadable = autowiredBeansDetail.getSongsService().getDownloadableSongs ("s1,s2");
for(Games dgmlist : downloadableSongsList) {
System.out.println(dgmlist.getSongid());
}