Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用maven读取SpringWebMVC3.2.8中的属性键_Spring_Spring Mvc - Fatal编程技术网

使用maven读取SpringWebMVC3.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"> <

我在SpringWeb模型视图控制器(MVC)框架中有这个类。SpringWeb模型视图控制器(MVC)框架的版本是3.2.8

在我的
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>