-
Notifications
You must be signed in to change notification settings - Fork 139
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
spring-modulith-observability causes Kotlin bean properties to be initialized as null #800
Comments
That's not unexpected regarding the class that you see being a proxy whose actual target will still have the proper dependencies wired. This should only be a problem if you try to access the fields directly. Method invocations, however, will pass the interceptor chain and ultimately trigger the method invocation on the target. Can you clarify how a problem manifests from that, beyond you seeing the |
Unfortunately few line screenshots are not that helpful in diagnosing the problem. Is there any chance you provide a minimal reproducer? Is anyone trying to access the field directly instead of calling a method passing the proxy? |
|
How do I reproduce the problem? |
Start the application and visit http://127.0.0.1:8080 to see the exception in the console. |
I am sorry, but I won't follow up unless you can properly prepare the project, including instructions what to do with the code to see the problem (what does "start the application" mean?). I ran the project ( |
Try |
When enabling
spring-modulith-observability
, Kotlin bean properties are unexpectedly initialized asnull
. For example, after enabling this module, properties such ashisHttpClient
andmedicalInstitutionCode
arenull
. Disabling the module resolves the problem.Expected behavior:
Actual behavior:
spring-modulith-observability
is enabled, the properties in the Kotlin bean arenull
as seen in the following screenshots.Screenshots:
null
values:null
for constructor-injected properties:The text was updated successfully, but these errors were encountered: