The Struts2 Spring plugin provides integration with Spring framework.
The Spring Plugin provides integration with Spring framework by overriding the Struts ObjectFactory
with StrutsSpringObjectFactory
to enhance the creation of core framework objects. When an action instance is managed by Spring, it uses the class
attribute in the Struts configuration to correspond to the id
attribute in the Spring configuration. If not found, the class will try to be created as usual, then be autowired by Spring. In the case of Actions, Spring's bean scope feature can be used to scope an Action instance to the session
, application
, or a custom scope, providing advanced customization above the default scoping.
More about Spring plugin: https://struts.apache.org/docs/spring-plugin.html
Spring and Struts 2: https://struts.apache.org/docs/spring-and-struts-2.html