Skip to content

Commit

Permalink
Merge pull request #230 from SonicCloudOrg/dev
Browse files Browse the repository at this point in the history
修复请求头问题
  • Loading branch information
ZhouYixun authored Jul 2, 2022
2 parents fa156d3 + f57ce54 commit c02aa6d
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 c02aa6d

Please sign in to comment.