I have a class in which I want to read a property file and initialize a static field using @value, but this always comes as null
public class MyClass{
@value(${my.value})
private static String myValue;
}
So my question here,
- Is there any workaround to do this like using a static setter.
- Why it does not work with static field, if I change it to non static it starts working :(