lukaszlenart opened a new pull request, #1571: URL: https://github.com/apache/struts/pull/1571
## Summary - Change default value of `struts.objectFactory.spring.autoWire.alwaysRespect` from `false` to `true` - Update JavaDoc in `StrutsConstants.java` to reflect new default and reference WW-3647 - Update field default in `SpringObjectFactory.java` ## Problem 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 like: ``` http://localhost:8080/XXXX/index!XXXX.action#XXXX ``` ## Solution Change the default to `true` so Spring respects the configured autowire strategy (`AUTOWIRE_BY_NAME` by default) instead of using the legacy mixed injection approach that always tries constructor injection first. ## Migration Notes Users who rely on the legacy constructor autowiring behavior can restore it by setting: ```xml <constant name="struts.objectFactory.spring.autoWire.alwaysRespect" value="false" /> ``` ## Test plan - [x] All Spring plugin tests pass (`SpringObjectFactoryTest` - 11 tests) - [ ] Manual verification with JNDI String bean scenario Fixes [WW-3647](https://issues.apache.org/jira/browse/WW-3647) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
