【发布时间】:2016-05-25 13:15:20
【问题描述】:
我创建了 spring mvc 应用程序,并且我在 D:\propertiesfile.properties 上有一个外部属性文件,我需要知道如何在 servlet-context.xml 中配置属性文件
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:property-placeholder location="file:D:\propertiesfile.properties>
<context:component-scan base-package="com.example.properties" />
但它不起作用。请指导我
【问题讨论】:
标签: java spring spring-mvc