Properties 带有MethodInvokingFactoryBean的PropertySourcesPlaceholderConfigurer-未解析的值

Properties 带有MethodInvokingFactoryBean的PropertySourcesPlaceholderConfigurer-未解析的值,properties,spring-3,unresolved-external,Properties,Spring 3,Unresolved External,我正在使用PropertySourcesPlaceholderConfigurer访问包含2个值的文件: 键1=值1 键2=值2 文件:datafile.properties 然后使用MethodInvokingFactoryBean将datafile.properties中的值设置为系统属性 ${key1} ${key2} 问题-${key1}&${key2}未解决。由于我正在使用PropertySourcesPlaceholderConfigurer加载datafile.proper

我正在使用PropertySourcesPlaceholderConfigurer访问包含2个值的文件: 键1=值1 键2=值2


文件:datafile.properties
然后使用MethodInvokingFactoryBean将datafile.properties中的值设置为系统属性


${key1}
${key2}

问题-${key1}&${key2}未解决。由于我正在使用PropertySourcesPlaceholderConfigurer加载datafile.properties,所以我希望这些值能够得到解析。有人能帮忙吗?

我是春天的初学者。我的解决办法是:

  • 文件
    datafile.properties
  • key1=Hellow
    键2=世界。
    
  • root-content.xml中的配置
  • 
    /WEB-INF/jdbc.properties
    /WEB-INF/datafile.properties