使用maven读取SpringWebMVC3.2.8中的属性键
我在SpringWeb模型视图控制器(MVC)框架中有这个类。SpringWeb模型视图控制器(MVC)框架的版本是3.2.8 在我的使用maven读取SpringWebMVC3.2.8中的属性键,spring,spring-mvc,Spring,Spring Mvc,我在SpringWeb模型视图控制器(MVC)框架中有这个类。SpringWeb模型视图控制器(MVC)框架的版本是3.2.8 在我的applicationContext.xml中,我有这个bean定义 <bean id="applicationProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="locations"> <
applicationContext.xml
中,我有这个bean定义
<bean id="applicationProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list><value>classpath:config/application.properties</value></list>
</property>
</bean>
但是当我在JSP中读取这个属性时,我得到了??
<fmt:message key="templateName"/>' >
”>
将它们添加为消息资源包
消息.属性
templateName=BLE_NORDIC
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list>
<value>message</value>
</list>
</property>
</bean>
消息
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list>
<value>message</value>
</list>
</property>
</bean>