I have a spring class with a main method. Inside the class, I am trying to read applicationContext.xml values. My intention is to compress this main class along with its dependent jars, property files, and applicationContext.xml.
But when I try to run the jar file through the unix command line, it looks like the applicationContext file is not loading.
ApplicationContext.xml is displayed inside the jar file and can see sysouts inside my class. The code used to read applicationContext.xml,
ApplicationContext context = new ClassPathXmlApplicationContext(
"classpath*:**/applicationContext.xml");
When I type context, it gives me the following message.
org.springframework.context.support.ClassPathXmlApplicationContext@89fbe3: start
up date [Mon Oct 01 15:07:43 IST 2012]; root of context hierarchy
When I try to print context.getBeanDefinitionCount () - it gives me 0.
eclipse. applicationContext.xml bean 13.
, , . , .