instrumenting-java-apps-using-opentelemetry
instrumenting-java-apps-using-opentelemetry copied to clipboard
fix: Update @Value annotations and properties-maven-plugin to correctly reference property keys
Issue #, if available:
- 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
- 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
- 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.