79587061

Date: 2025-04-22 16:55:12
Score: 3
Natty:
Report link

Add a system property on your 'java' line (-Dmy.host=<hostname or IP>) that starts the application and use the ${my.host} syntax in the annotation. I don't think you can modify the annotation in the constructor or any method. MIGHT be able to do some magic with reflection in an @PreConstruct method (if one exists).

Reasons:
  • No code block (0.5):
  • User mentioned (1): @PreConstruct
  • Single line (0.5):
  • Low reputation (1):
Posted by: Dino Druding - NOAA Affiliate