每个人都知道,如果我们想要读取属性文件,我们可以这样做:@PropertySource("classpath:/application.properties") return new PostServiceImpl(name);但是,现在我有了一个类似于SpringBoot的框架它可以把Spring和Mybatis结合起来。
问题是前面的代码只能读取我
我几乎没有属性文件(application.properties),它包含类路径下的自定义配置和spring配置,我希望基于系统变量加载这些属性。new ClassPathResource("file1"), new ClassPathResource("file2"));}
但是它未能覆盖spring配置(在application.properties中