mirror of
https://github.com/apache/struts.git
synced 2026-08-11 09:36:57 +00:00
fd87425863
Change the default value of struts.objectFactory.spring.autoWire.alwaysRespect from false to true to fix the Spring constructor autowiring issue. When a Spring String bean exists (e.g., JNDI lookup with default-value), Spring's AUTOWIRE_CONSTRUCTOR strategy incorrectly injects that value into ALL String parameters of ServletActionRedirectResult constructors, causing malformed redirect URLs. Setting alwaysRespect to true by default ensures the configured autowire strategy (AUTOWIRE_BY_NAME) is consistently used, preventing unintended bean injection. Users who rely on the legacy constructor autowiring behavior can restore it by setting: <constant name="struts.objectFactory.spring.autoWire.alwaysRespect" value="false" /> Fixes https://issues.apache.org/jira/browse/WW-3647 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
Struts 2 Spring plugin
The Spring Plugin works by overriding the Struts ObjectFactory to enhance the creation of core framework objects You will find more details in documentation.
Installation
Just drop this plugin JAR into WEB-INF/lib folder or add it as a Maven dependency.