instrumenting-java-apps-using-opentelemetry icon indicating copy to clipboard operation
instrumenting-java-apps-using-opentelemetry copied to clipboard

fix: Update @Value annotations and properties-maven-plugin to correctly reference property keys

Open Gumparthypavankumar opened this issue 1 year ago • 0 comments

Issue #, if available:

  1. What Changed?
  • Updated the @Value annotations in controller to correctly reference properties, now using {} i.e @Value("${property.key}")
  • Updated the properties-maven-plugin execution phase from package -> initialize to ensure property files are included in the final JAR
  1. What is the reason for change?
  • The original code had @Value annotations without curly brackets as a result spring does not resolve properties, and the application did not throw errors even though properties were not being loaded
  • The previous configuration of properties-maven-plugin did not copy property files in the generated JAR
  1. Is there anything to watch out for anything particularly remarkable?
  • This fix addresses the issue of missing properties and inconsistent property resolution. There is nothing remarkable to note beyond standard fixes

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Gumparthypavankumar avatar Nov 19 '24 16:11 Gumparthypavankumar