fix: 兼容不使用国际化的情况。

This commit is contained in:
Suomm 2023-07-29 10:18:24 +08:00
parent 7170086004
commit ab87696d91

View File

@ -65,6 +65,9 @@ public class MybatisFlexException extends RuntimeException {
}
private String getMessage(Locale locale) {
if (pattern == null) {
return super.getMessage();
}
String localizedString = pattern.getLocalizedString(locale);
return MessageFormat.format(localizedString, arguments);
}