各类消息配置
- Messages.java
- 配置文件:
org.mybatis.generator.internal.util.messages.messages.properties
private static final String BUNDLE_NAME = "org.mybatis.generator.internal.util.messages.messages";
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
public static String getString(String key, String parm1, String parm2,String parm3) {
try {
return MessageFormat.format(RESOURCE_BUNDLE.getString(key),
new Object[] { parm1, parm2, parm3 });
} catch (MissingResourceException e) {
return '!' + key + '!';
}
}