我有2个属性文件application.properties和process.properties。我必须从application.properties中读取spring.profiles.active,并且需要根据环境调用process- {spring.profiles.active} .properties,例如process-dev.properties。
<context:property-placeholder
location="classpath:application.properties" />
<context:property-placeholder
location="classpath:process-${spring.profiles.active}.properties" />
我正面临
无法解析占位符'spring.profiles.active'的价值 “ classpath:process-$ {spring.profiles.active} .properties”由以下原因引起: java.lang.IllegalArgumentException:无法解析占位符 价值“ spring.profiles.active” “ classpath:process-$ {spring.profiles.active} .properties”
请提供建议