Some isues on Spring

Inversion of Control
The core of the Spring Framework is based on the principle of Inversion of Control (IoC).. IoC is a
technique that externalizes the creation and management of component dependencies. Consider an
example where class Foo depends on an instance of class Bar to perform some kind of processing.
Traditionally, Foo creates an instance of Bar using the new operator or obtains one from some kind of
factory class. Using the IoC approach, an instance of Bar (or a subclass) is provided to Foo at runtime by
some external process.

Denpendency Injection
Spring’s DI implementation is based around two core Java concepts: JavaBeans and interfaces.
When you use Spring as the DI provider, you gain the flexibility of defining dependency configuration
within your applications in different ways (e.g., externally in XML files, Spring Java configuration classes,
or Java annotations within your code). JavaBeans (also known as POJOs, for Plain Old Java Objects)
provide a standard mechanism for creating Java resources that are configurable in a number of ways.

你可能感兴趣的:(spring)