davsclaus opened a new pull request, #24714:
URL: https://github.com/apache/camel/pull/24714

   ## Summary
   
   - `SpringInjector.newInstance(type, factoryClass, factoryMethod)` was 
missing the `CamelContextAware.trySetCamelContext()` call that 
`DefaultInjector` has, so `CamelContextAware` beans created through 
`#class:...#factoryMethod` syntax did not get the `CamelContext` injected when 
running in Spring/Spring Boot
   - Added a `CamelContext` field to `SpringInjector` and set it from 
`SpringCamelContext.createInjector()`
   
   ## Test plan
   
   - [x] New `SpringInjectorFactoryMethodTest` with two tests verifying 
CamelContext injection via both `newInstance(type, factoryMethod)` and 
`newInstance(type, factoryClass, factoryMethod)`
   - [ ] Verify no regressions in existing camel-spring-xml tests
   
   _Claude Code on behalf of davsclaus_
   
   Co-Authored-By: Claude Opus 4.6 <[email protected]>


-- 
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]

Reply via email to