How to read properties from yml file in springboot?

How to read properties from yml file in springboot?

Add Comment
1 Answer(s)
@Configuration
@EnableConfigurationProperties
@ConfigurationProperties
public class YAMLProperties {
 
    private String name;
    private String environment;
    private List<String> servers = new ArrayList<>();
    getters and setters
Answered on June 23, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.