spring-projects / spring-projects/spring-modulith

spring-modulith-observability causes Kotlin bean properties to be initialized as null

Open
#800 11 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Sep 12, 2024.

in: observability meta: waiting for feedback
Dominant language
Java
Stars
1.2k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

When enabling spring-modulith-observability, Kotlin bean properties are unexpectedly initialized as null. For example, after enabling this module, properties such as hisHttpClient and medicalInstitutionCode are null. Disabling the module resolves the problem.

Expected behavior:
  • Kotlin bean properties should be correctly initialized when observability is enabled.
Actual behavior:
  • When spring-modulith-observability is enabled, the properties in the Kotlin bean are null as seen in the following screenshots.
Screenshots:
  1. Bean initialization with null values:
image
  1. CGLIB proxy details showing null for constructor-injected properties:
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.