Spring Property Injection in a final attribute @Value - Java
If you are looking for an example here is one:
public class Test {
private final String value;
public Test(@Value("${some.value}") String value){
this.value=value;
System.out.println(this.value);
}
}
The only way you can inject values into a final field is through Constructor Injection. Everything else would be an awful hack on Spring's side.