简体   繁体   English

Struts2中的全球资源包

[英]Global Resource Bundle in Struts2

将电子邮件存储在Struts2应用程序的全局资源包中可以吗?

I am not sure what kind of email you are talking about? 我不确定您在谈论哪种电子邮件? moreover please remember, Resource bundles contain locale-specific objects. 此外,请记住,资源包包含特定于语言环境的对象。 When your program needs a locale-specific resource, a String for example, your program can load it from the resource bundle that is appropriate for the current user's locale. 当您的程序需要特定于语言环境的资源(例如字符串)时,您的程序可以从适合当前用户语言环境的资源包中加载它。 In this way, you can write program code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles. 这样,您可以编写很大程度上独立于用户语言环境的程序代码,从而将资源包中的大多数(即使不是全部)特定于语言环境的信息隔离开来。

if you want to store user email addresses i do not believe this is the good place to store them, you can either store them in the databases or any other such place. 如果您要存储用户电子邮件地址,我不认为这是存储它们的好地方,则可以将其存储在数据库中或任何其他此类位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM