public class BundleUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
LOG |
| 构造器和说明 |
|---|
BundleUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getBaseString(String key,
String... params)
读取base包国际化文件,因为base包有通用的基本提示,也经常用到,具体看 net.mingsoft.base.resources.resources
|
static String |
getLocaleString(String key,
String resources)
已过时。
|
static String |
getLocalString(String key,
String... fullStrs)
已过时。
|
static String |
getResString(String key)
已过时。
|
static String |
getResString(String key,
ResourceBundle rb)
已过时。
|
static String |
getResString(String key,
ResourceBundle rb,
String... fullStrs)
已过时。
|
static String |
getResString(String key,
String... fullStrs)
已过时。
|
static String |
getString(String resources,
String key,
String... params)
读取国际化资源文件,优先模块对应的资源文件,如果模块资源文件找不到就会优先基础层,对应的控制层代码,可以直接使用this.getResString()方法
|
@Deprecated public static String getLocaleString(String key, String resources)
key - resources - 资源文件所在位置@Deprecated public static String getResString(String key)
key - 键值@Deprecated public static String getResString(String key, ResourceBundle rb)
key - 键值rb - 模块对应资源文件@Deprecated public static String getResString(String key, String... fullStrs)
key - 键值fullStrs - 需填充的值@Deprecated public static String getResString(String key, ResourceBundle rb, String... fullStrs)
key - 键值rb - 模块对应资源文件@Deprecated public static String getLocalString(String key, String... fullStrs)
key - 键值fullStrs - 需填充的值public static String getString(String resources, String key, String... params)
resources - 资源文件路径,通常是 每个模块包下*.constant 中Const.RESOURCESkey - 国际化文件keyparams - 拼接值Copyright © 2023. All rights reserved.