You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

Dependency injection removes the responsibility for object creation and object linking from the objects themselves to a factory. The factory is often provided by an Inversion of Control (IoC) container. For an overview of of Inversion of Control containers and the Dependency Injection pattern, please see Martin Fowler's article.

Internally, the framework uses its own dependency injection container, based on Google Guice. Applications are free to use Spring, Plexus, or even a local copy of Guice for any dependency injection needs.

Actions can still be instantiated via the Spring configuration by way of the Spring, but Spring is entirely optional now.

(info) The WebWork/XWork IoC container utilized by WebWork 2.1 is not supported by Struts 2.

Next: Related Tools

  • No labels