我需要从程序运行之前我不知道的位置将一些属性加载到Spring上下文中.
所以我认为,如果我有一个没有位置的PropertyPlaceholderConfigurer,它会my.location从系统属性读入,然后我可以在上下文中使用该位置:property-placeholder
像这样
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<context:property-placeholder location="${my.location}"/>
Run Code Online (Sandbox Code Playgroud)
但这不起作用也不行 location="classpath:${my.location}"
保罗