There are two way,
@Value
in you class @Value("#{'${application yml field name}'}")
public String ymlField;
OR
@Configuration
class where you can add all your @value
@Configuration
public class AppConfig {
@Value("#{'${application yml field name}'}")
public String ymlField;
}