Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleAbout Spring

Spring is a lightweight container, providing centralized, automated configuration and wiring of your application objects, using a technique called "Dependency Injection"

(tick) Spring integration is built into framework. In fact, the default object factory for s2 is Springprovided by a Struts Plugin.

Spring Integration

To enable Spring integration, simply include struts2-spring-plugin-x-x-x.jar in your application.

If you are using more than one object factory, (for example, by including both the Spring and Plexus plugins in your application,) you will need to set the struts.objectFactory property:Spring integration is enabled by default. The default object factory is set in the struts.properties files.

Code Block
titlestruts.properties
struts.objectFactory = spring

...