修复获取Locale空问题

1.x
tanghc 6 years ago
parent 543db4390d
commit bffdc5bf8f
  1. 6
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/bean/ServiceContext.java

@ -31,7 +31,11 @@ public class ServiceContext extends ConcurrentHashMap<String, Object> {
} }
public Locale getLocale() { public Locale getLocale() {
return getRequest().getLocale(); HttpServletRequest request = getRequest();
if (request == null) {
return Locale.SIMPLIFIED_CHINESE;
}
return request.getLocale();
} }
/** /**

Loading…
Cancel
Save