浏览器标识 判断移动端

 public static boolean isPhone(HttpServletRequest request) {
        String clientType = request.getHeader("User-Agent");
        if (clientType == null) {
            clientType = request.getHeader("user-agent");
        }
        return clientType.matches(".*AppleWebKit.*Mobile.*");
    }

你可能感兴趣的:(浏览器标识 判断移动端)