-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code generation does not support ApplicationContext #30900
Comments
@CrazyHZM thanks for the report but you don't need to add a constructor argument value if you're using autowiring. Autowiring should inject the context just fine. Can you please try that? |
@snicoll Exception stack:
|
Yes, it looks like it takes an
I think it does for the simple reason it should be the same code as regular runtime with a number of limitations that seems unrelated. Unfortunately, some partial code in text does not make a valid reproducer. If you want support, please take the time to attach a small sample we can run ourselves that reproduces the issue you've described. Thanks. |
@snicoll The ServiceBean is defined here: https://github.com/apache/dubbo/blob/3.2/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java |
|
After an edit, I can access the second link. AOT doesn't support picking up the "right" constructor based on the available arguments. The runtime has such a feature because it can use the instances that have already been created prior to handling the bean, and instances have full type information. We could try to be best effort and rely on the type signature of the bean definitions but we haven't done this so far as we are considering deprecating this feature at some point. It looks like you create the bean definition in an attempt for it to use the |
Thanks for replying, |
Alright, that's good to know. I've created #30917 to try to offer an escape hatch for this use case. There are more options defined here in case you're interested. |
Repeat step:
Affects: 6.0.11
Exception stack
The text was updated successfully, but these errors were encountered: