Spring配置资源文件的两种方式
2007-07-07 22:33
337 查看
资源文件在ch5.applicationContext.MessageResource包内,资源主名是labels
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>ch5.applicationContext.MessageResource.labels</value>
</list>
</property>
</bean>
或者
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>classpath:ch5/applicationContext/MessageResource/labels</value>
</list>
</property>
</bean>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>ch5.applicationContext.MessageResource.labels</value>
</list>
</property>
</bean>
或者
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>classpath:ch5/applicationContext/MessageResource/labels</value>
</list>
</property>
</bean>
相关文章推荐
- spring 配置国际化资源文件的两种方式
- spring 配置国际化资源文件的两种方式(转)
- 详解Spring-boot中读取config配置文件的两种方式
- 【spring Boot】spring boot获取资源文件的三种方式【两种情况下】
- springBoot使用Controller读取配置文件两种方式&读取自定义配置方法
- SpringBoot配置Bean的两种方式--注解以及配置文件
- Spring-boot中读取config配置文件的两种方式
- Spring 读取XML配置文件的两种方式
- Spring配置文件applicationContext.xml的两种拆分方式
- spring加载配置文件的两种方式
- spring读取配置文件的两种方式
- Spring扫描配置文件的两种方式及获取配置文件属性参数的方式
- spring+hibernate 两种整合方式配置文件
- spring中读取资源文件两种方式及应用场景
- spring加载配置文件的 两种方式
- Spring-boot中读取config配置文件的两种方式
- Spring-boot中读取config配置文件的两种方式
- Spring-boot中读取config配置文件的两种方式
- Spring配置文件applicationContext.xml的两种拆分方式
- spring 配置加载外部文件的两种方式