如果您确保在每个涉及的上下文中每个占位符都忽略了无法解析的密钥,那么这两种方法都会起作用。例如:
<context:property-placeholderlocation="classpath:dao.properties, classpath:services.properties, classpath:user.properties"ignore-unresolvable="true"/>
要么
<bean id="propertyConfigurer" > <property name="locations"> <list> <value>classpath:dao.properties</value> <value>classpath:services.properties</value> <value>classpath:user.properties</value> </list> </property> <property name="ignoreUnresolvablePlaceholders" value="true"/> </bean>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)