Using a construct such as
@Component
public class SomeClass {
@Inject
private Environment env;
private String key;
@PostConstruct
private void init() {
key = env.getProperty("SOME_KEY_PROPERTY");
}
....
}
it is possible to assign some field with some property.
Is there a shorter, more concise form to do this?