posted 17 years ago
This allows the Spring container to inject the required object by reading the proper class name from beans configuration file.
This is called "Depenedency Injection" where your class is not responsible to create its associated objects. Another concept here is "Decoupling": this means you use the interface (not the actual implementation) to decalre you class fields. This is important because you may have different implementations of the same service interface, therefore, you don't couple your class with one implementation. For example, insted of using:
Use:
Spring container allows you to inject the actual implementation using beans configuration file.
SCJP 90%<br />FileNet Certified Professional: Content Management Developer 92%<br />FileNet Certified Professional: Business Process Management Developer 92%