1

Do you know if it is possible to pass property from file into annotation, when using Spring?

e.g app.properties

p='dev'

and in java

@Profile(${p})

Is such thing possible?

xLatency
  • 365
  • 4
  • 12

1 Answers1

1

No, it's not possible. Annonations are compile time only so you cannot replace the value in runtime.

StanislavL
  • 56,971
  • 9
  • 68
  • 98