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?
No, it's not possible. Annonations are compile time only so you cannot replace the value in runtime.