我有一个spring应用程序,它当前正在使用*.properties文件,我想让它使用YAML文件。
我发现类似乎能够做我需要的事情。
我的问题是我不确定如何在我的Spring应用程序中使用这个类(它使用基于注释的配置)。似乎我应该用方法在中配置它。
之前,我使用加载属性文件,如下所示:
@Configuration
@PropertySource("classpath:/default.properties")
public class PropertiesConfig {
@Bean
public static PropertySourcesPlaceho