情景:在應用我有作爲模板來生成電子郵件語言相關的屬性文件:如何在幾個ResourceBundles之間共享區域獨立屬性?
email-subscription_en.properties
:
email.subject=You are successfully subscribed to list {0}
email.body=...
email-cancellation_en.properties
:
email.subject=You are successfully unsubscribed from list {0}
email.body=...
等。現在,在Spring上下文我想有這些捆綁:
<util:properties id="commonMailProperties">
<prop key="email.from">[email protected]</prop>
<prop key="email.to">{0}@company.org</prop>
</util:properties>
怎麼可能:
<bean id="subscriptionMailProperties" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename" value="org.company.email-subscription" />
</bean>
<bean id="cancellationMailProperties" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename" value="org.company.email-cancellation" />
</bean>
與我想在上下文中宣佈這些共同的語言無關性合併?