-
Notifications
You must be signed in to change notification settings - Fork 1.7k
SubstrateVM should be able to analyze Spring functional bean definitions #905
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
Comments
@sdeleuze, kind of interesting result. If I run your classes in gradle with native-image I do get another result with RC10 on Linux sergej-P50 4.18.0-13-generic #14-Ubuntu SMP Wed Dec 5 09:04:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Regarding your issue with:
It is quite easy to write a NodePlugin, which will react on every method invocation of registerBean and gets the argument. Or you could use an @AutomaticFeature like the guys from Graal-Team do, to register callbacks, when some specific method has been called. In my opinion it is not SubstrateVMs task to support every framework. Like I said, it is quite easy to dynamically register classes via static code analysis. |
@SergejIsbrecht Where can I find documentation and samples to write such |
@cstancu I will be happy to close that issue and implement it myself on Spring Fu side, I just need a little bit of guidance. Is |
|
@sdeleuze Would this new agent that records reflection usage help? Prototype is described at "https://github.com/oracle/graal/blob/master/substratevm/CONFIGURE.md". Do applications typically have tests that would exercise that reflection? |
@thomaswue I will give it a try tomorrow. |
@sdeleuze I will close this issue as not-a-bug. As you mentioned above the automatic reflection registration should be implemented on Spring Fu side via a |
@sdeleuze we currently don't have a tutorial for |
Thanks for the guidance @cstancu. |
Here is a simple Spring application with beans defined in a programmatic way.
This currently requires the following reflection configuration:
SubstrateVM should be able to analyze this kind of programmatic DI to allow running such Spring Framework application without advanced configuration.
Currently during compilation, we get
And when running the app without reflection config:
A repro project is available at https://github.com/sdeleuze/graal-issues/tree/master/functional-bean-definition.
The text was updated successfully, but these errors were encountered: