Skip to content

Commit

Permalink
修复请求头问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Jul 2, 2022
1 parent 43e865e commit f57ce54
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType
language = l;
}
String[] split = language.split("_");
Locale locale = new Locale(split[0], split[1]);
Locale locale;
if (split.length >= 2) {
locale = new Locale(split[0], split[1]);
} else {
locale = new Locale("zh", "CN");
}
// Get return body
Object returnBody = container.getValue();

Expand Down

0 comments on commit f57ce54

Please sign in to comment.