@PropertySources({@PropertySource("db.properties"),@PropertySource("db1.properties")})
读取单个的我会 这个里面是个PropertySource数组,怎么读取 db.properties 以及 db1.properties 并分别注入到两个properties对象中
多看看源码就知道了
读取多个配置文件:
@PropertySource(value = {"classpath:spring/config.properties","classpath:spring/news.properties"})