I am trying to load some properties from property files in Spring boot but also want to access them using a list. I am unsure about the order in which the class member will be initialised.
@Getter
@Setter
@ConfigurationProperties
public class ConfigurationM{
@Value("${propA}")
private String propA;
@Value("${propB}")
private String propB;
private List<String> list = Collections.unmodifiableList(propA, propB);
}
Does @Value annotation injects value before the list is initialised? How is the order of evaluation determined when the class is loaded while using annotations?