-
1. Re: WELD-000119 Bean not found when searching bean under spring boot fat jar
manovotn Oct 21, 2019 10:33 AM (in response to alany07)Hello,
let me start by saying that combining Spring and Weld is brave step into mostly uncharted (or undocumented?) territory ;-)
Partly, this is similar to [WELD-2569] BeanArchives can't be resolved in URL form - JBoss Issue Tracker in a way that it asks Weld to recognize some non-standard format for archives, or, in this case, location of files representing beans.
If this is something you'd like to see happen, then please create a Weld JIRA and send a PR. Do you have a reproducer for this? Some simple GH project for instance.
I see you have done some digging, but changing this directly inside WeldResourceLoader is a bad idea, ideally, you want to change it at the location where we transform file location into class name.
I suspect this will be around FileSystemBeanArchiveHandler#add() method. Maybe the utils method could be tempered with to account for this? I am just guessing though, haven't debugged this myself.
-
2. Re: WELD-000119 Bean not found when searching bean under spring boot fat jar
alany07 Oct 25, 2019 12:54 PM (in response to manovotn)H Matej,
Thanks for the response. It's quite a lot of efforts to combine both Spring and Weld. I am migrating one service from jboss based to spring boot based and still like to maintain all the weld cdi development we had, therefore the adventure.
Thanks for pointing out the place to make changes in FileSystemBeanArchiveHandler. I agree that WeldResourceLoader is not a good place. It's just easier to meet my goal. FileSystemBeanArchiveHandler is a lot more complex and I was afraid that it may break other discovery functions. My fix has least impact I think. I will file JIRA and try to contribute to a PR with fix in FileSystemBeanArchiveHandler. I will create a reproducer project for it.
Thanks,
-Alan
-
3. Re: WELD-000119 Bean not found when searching bean under spring boot fat jar
manovotn Oct 29, 2019 5:27 AM (in response to alany07)alany07 wrote:
I will file JIRA and try to contribute to a PR with fix in FileSystemBeanArchiveHandler. I will create a reproducer project for it.Awesome, thanks!