mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46: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>