.properties 文件何时加载到 JBoss 上?

发布于 2024-12-23 11:09:28 字数 84 浏览 1 评论 0原文

.properties 文件何时加载到 JBoss 上?一次且仅当 JBoss 启动时?或者每次重新部署应用程序时都会读取它们?

When are .properties files loaded on JBoss? Once and only when JBoss starts? Or are they read every time an application is deployed anew?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

折戟 2024-12-30 11:09:28

我认为对此没有通用的答案,这取决于您要重新加载哪些 .properties 文件,即哪个服务或应用程序正在加载它们。

如果 .properties 文件是应用程序(war 或ear)的一部分,那么它们通常会在重新部署应用程序时重新加载。

如果它们是 JBoss 配置的一部分,那么它们是 JBoss 附带的各种服务的配置。这些服务通常在 JBoss 服务器启动时启动,并从 .properteis 文件中读取其配置,作为其单独启动过程的一部分。如果您想从这些服务之一使用的 .properties 文件重新加载配置,只需重新启动使用该文件的一项服务就足够了,而无需重新启动整个 JBoss 容器。例如,您可以配置属性服务来从 .properties 文件设置 Java 系统属性。如果您通过触摸文件deploy/properties-service.xml 仅重新启动该服务,它将重新加载.properties 文件并在JBoss 仍在运行时更新Java 系统属性。

I don't think there is a general answer for this, it depends on which .properties files you want to reload, i.e. which service or application is loading them.

If the .properties file is part of an application (a war or ear) they will usually be reloaded when the application is redeployed.

If they are part of the JBoss config, they are configuration for the various services that come with JBoss. These services usually start when the JBoss server starts up and read their configuration from the .properteis files as part of their individual startup process. If you want to reload the configuration from a .properties file that is used by one of these services, it may be enough to just restart that one service that uses the file, without the need to restart the whole JBoss container. There is e.g. the properties-service that you can configure to set Java system properties from .properties files. If you restart only that service by touching the file deploy/properties-service.xml, it will reload the .properties file(s) and update the Java system properties while JBoss is still running.

阳光下的泡沫是彩色的 2024-12-30 11:09:28

JBoss 目录中有相当多的属性文件。它们中的每一个都可能由系统的不同部分在不同时间加载。这甚至可能是时间触发的(例如每小时)或取决于应用程序。

如果您想要更具体的答案,您必须更具体地说明您感兴趣的文件。并且特定版本的 JBoss 可能也不会造成伤害。

There are quite a few property files in the JBoss directories. Each of them might is loaded by different parts of the system at different times. That might be even time-triggered (e.g. every hour) or dependent on the application(s).

If you want a more specific answer you have to be more specific which files you are interested in. And a specific version of JBoss might not hurt also.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文