【发布时间】:2011-10-23 15:37:33
【问题描述】:
在我的 web.xml 我想从属性文件中读取欢迎文件 类似:
<welcome-file-list>
<welcome-file>${home.page}</welcome-file>
</welcome-file-list>
我已配置 propertyPlaceholderConfigurer:
<bean id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:messages/application.properties</value>
</list>
</property>
</bean>
是否应该将额外的参数添加到 web.xml,或者需要定义另一个 bean 或什么?
我在 web.xml 的同一级别上还有另一个 xml 文件(在 WEB-INF 目录下) 我可以以相同的方式从其中的属性文件中读取吗?
请指教。
【问题讨论】:
标签: spring jakarta-ee web.xml