如何在应用程序上下文中读取系统环境变量?
我想要这样的东西:
<util:properties id="dbProperties"
location="classpath:config_DEV/db.properties" />或
<util:properties id="dbProperties"
location="classpath:config_QA/db.properties" />取决于环境的不同。
我可以在我的应用程序上下文中使用这样的东西吗?
<util:properties id="dbProperties"
location="classpath:config_${systemProperties.env}/db.properties" />其中,实际val是根据系统环境变量设置的
我使用的是Spring3.0
发布于 2020-12-06 20:43:12
更新版(2020)。
https://stackoverflow.com/questions/3965446
复制相似问题