Try experimenting with the minimal basics using the dependency injection container only. Initialize a simple application context like this, where applicationContext.xml
is at the top of your classpath.
AbstractApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
context.registerShutdownHook();
Use a simple (copy and pasted right from my IDE, most of the imported schemas are not important for you) application context definition like this:
- Read the high level reference (focusing on chapter 3 and 4) and after that Spring by example.
- After reading chapter 3 you should be able to define simple beans with dependencies and FactoryBeans.
- Learn about
to be able to omit some bean declarations.
- Come back to SO to ask more questions :-)