Fre*_*ser 17 java spring spring-mvc
我有2个属性文件.我已经提到了这两个文件context:property-placeholder......
<context:property-placeholder location="conf/ConfServer.conf,conf/LicenseSettings.properties" />
Run Code Online (Sandbox Code Playgroud)
我也尝试过这个
<context:property-placeholder location="conf/ConfServer.conf,conf/LicenseSettings.properties" />
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>conf/LicenseSettings.properties</value>
</list>
</property>
<property name="ignoreUnresolvablePlaceholders" value="true"/>
</bean>
Run Code Online (Sandbox Code Playgroud)
我尝试的上述两种方法都不起作用.
任何人都可以发现错误并帮助我解决这个问题吗?
我已经提到了这一点,但它对我没有用.
Kev*_*sox 43
您可以context:property-placeholder在配置文件中指定多个标记.您还可以使用该order属性指定首先加载的内容.
<context:property-placeholder location="conf/ConfServer.conf" order="1" ignore-unresolvable="true" />
<context:property-placeholder location="conf/LicenseSettings.properties" order="2" ignore-unresolvable="true" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28793 次 |
| 最近记录: |