Commit aeaf543c authored by Quxl's avatar Quxl

xx

parent 47b4b7d1
...@@ -17,7 +17,7 @@ public class LocaleCookieInterceptor extends HandlerInterceptorAdapter { ...@@ -17,7 +17,7 @@ public class LocaleCookieInterceptor extends HandlerInterceptorAdapter {
@Override @Override
public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception { public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception {
String str = req.getParameter(language); String str = req.getParameter(language);
if(str == null || str.matches("[a-z]{2}_[A-Z]{2}")) { if(str == null || !str.matches("[a-z]{2}_[A-Z]{2}")) {
str = "zh_CN"; str = "zh_CN";
} }
String[] kv = str.trim().split("_", 2); String[] kv = str.trim().split("_", 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment