xLatency
xLatency

Reputation: 365

Java annotation value from property file

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?

Upvotes: 1

Views: 743

Answers (1)

StanislavL
StanislavL

Reputation: 57381

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

Upvotes: 1

Related Questions