Java 应用程序运行时,消息包存储在哪里(内存或磁盘)?

Java 应用程序运行时,消息包存储在哪里(内存或磁盘)?,java,struts2,struts,Java,Struts2,Struts,我正在使用JavaStruts2。我正在使用ActionSupport(由struts2提供)的getText()读取属性文件。它们作为java.util.ResourceBundle实例存储在XWork核心库的LocalizedTextUtil的静态ConcurrentMap中 默认情况下,ResourceBundle缓存在内存中。它们作为java.util.ResourceBundle实例存储在XWork核心库的LocalizedTextUtil中的静态ConcurrentMap中 默认情况

我正在使用JavaStruts2。我正在使用ActionSupport(由struts2提供)的getText()读取属性文件。

它们作为
java.util.ResourceBundle
实例存储在XWork核心库的
LocalizedTextUtil
的静态
ConcurrentMap


默认情况下,ResourceBundle缓存在内存中。

它们作为
java.util.ResourceBundle
实例存储在XWork核心库的
LocalizedTextUtil
中的静态
ConcurrentMap


默认情况下,ResourceBundle缓存在内存中。

默认情况下,它存储在内存中。但是,如果您想让框架检查每个查找的属性文件,您可以这样做。这对发展来说是件好事

您可以在
struts.properties
文件中配置这些内容。以下内容来自struts default.properties,它是此类配置的注释样板

### when set to true, Struts will act much more friendly for developers. This
### includes:
### - struts.i18n.reload = true
### - struts.configuration.xml.reload = true
### - raising various debug or ignorable problems to errors
###   For example: normally a request to foo.action?someUnknownField=true should
###                be ignored (given that any value can come from the web and it
###                should not be trusted). However, during development, it may be
###                useful to know when these errors are happening and be told of
###                them right away.
struts.devMode = false

### when set to true, resource bundles will be reloaded on _every_ request.
### this is good during development, but should never be used in production
struts.i18n.reload=false

WEB-INF/classes/struts.properties
文件中将这两个属性之一设置为
true
,将从physcial属性文件为每次查找加载框架。

默认情况下,它存储在内存中。但是,如果您想让框架检查每个查找的属性文件,您可以这样做。这对发展来说是件好事

您可以在
struts.properties
文件中配置这些内容。以下内容来自struts default.properties,它是此类配置的注释样板

### when set to true, Struts will act much more friendly for developers. This
### includes:
### - struts.i18n.reload = true
### - struts.configuration.xml.reload = true
### - raising various debug or ignorable problems to errors
###   For example: normally a request to foo.action?someUnknownField=true should
###                be ignored (given that any value can come from the web and it
###                should not be trusted). However, during development, it may be
###                useful to know when these errors are happening and be told of
###                them right away.
struts.devMode = false

### when set to true, resource bundles will be reloaded on _every_ request.
### this is good during development, but should never be used in production
struts.i18n.reload=false

WEB-INF/classes/struts.properties文件中将这两个属性中的任何一个设置为
true
,将使框架在每次查找时从物理属性文件加载。

我将把它读入某种hashmap。我将把它读入某种hashmap。