1. Basic terms
Ioc - Inversion of Control
AOP - Aspect Oriented Programming
Article about IOC written by Martin Fowler www.martinfowler.com/articles/injection.html
2. How to start Spring in IDEA?
How to use Spring to achieve this simple function?
Here comes to "spring-config.xml":
Remember the "id " should be unique.
As for the "class ", write the name of the class you need, then when you use "getBean()", it will return an object from this class.
Write this in the Main:
Then, run the programme, we can see the output.
However, we can find that we do not create a new "OneInterfaceImpl" by using the sentence like "OneInterfaceImpl Myinterface = new OneInterfaceImpl()" . Actually, during the process we create "context", Spring helps us create it, so we can use it directly later.