private static final String BUNDLE_NAME = "org.jboss.messages";//属性文件所在位置
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
private ZteMessages()
{
}
public static String getString(String key)
{
// System.out.println(Locale.getDefault());
try
{
return RESOURCE_BUNDLE.getString(key);
}
catch (MissingResourceException e)
{
return '!' + key + '!';
}
}
根据key获取property文件中的值工具类
最新推荐文章于 2022-08-15 10:15:49 发布