diff options
| author | fangshunjian <[email protected]> | 2018-11-23 13:59:29 +0800 |
|---|---|---|
| committer | fangshunjian <[email protected]> | 2018-11-23 13:59:29 +0800 |
| commit | 6327b0536a495ba915c6aab518b46b6eeec7dfd5 (patch) | |
| tree | 4a482163c248c0620beecc85e1d963ef4098653c | |
| parent | d26010844ab53cd343aab9314b5998a99ecc3fb9 (diff) | |
1、解决配置文件中key不存在时Constants类无法初始化的bug
| -rw-r--r-- | src/nis/nms/core/Constants.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nis/nms/core/Constants.java b/src/nis/nms/core/Constants.java index 419c93e..7f9faf2 100644 --- a/src/nis/nms/core/Constants.java +++ b/src/nis/nms/core/Constants.java @@ -5,6 +5,7 @@ import java.util.ResourceBundle; import org.apache.commons.lang.StringUtils; import nis.nms.util.BaseAction; +import nis.nms.util.ResourceBundleWrapper; public class Constants { /** @@ -211,7 +212,7 @@ public class Constants { public static final String DETEC_TIMEOUT_POLICE_LEVEL; - public static ResourceBundle rb = ResourceBundle.getBundle("myconfig"); + public static ResourceBundleWrapper rb = BaseAction.rb; // #---Email------- public static final String EMAIL_ADDRESS ; public static final String EMAIL_USERNAME ; @@ -346,6 +347,11 @@ public class Constants { } public static String DETECT_TIMEOUT_ALARMINFO = "i18n_Constants.xmlFile.monitorInfo1_n81i"+" %d "+"i18n_Constants.xmlFile.monitorInfo2_n81i"; + + public static void main(String[] args) { + System.out.println(Constants.NATION_ROLE); + } + } |
