I have an entity/model with discriminator formula and now I'm assigning a discriminator formula like the following sample,
@Entity @DiscriminatorFormula("type") class Student { // code }
In the same case, how can I assign discriminator value from application.properties
in Spring Boot?
1 Answers
Answers 1
The expression in the class level annotation should be a constant, i.e, final and static .what you are trying to achieve is not possible. The best you can do is read it from a constant file rather than application.properties.
0 comments:
Post a Comment