/** 获取主题方案 */ @RequestMapping(value = "/theme/{theme}") public String getThemeInCookie( @PathVariable String theme, HttpServletRequest request, HttpServletResponse response) { if (StringUtils.isNotBlank(theme)) { CookieUtils.setCookie(response, "theme", theme); } else { theme = CookieUtils.getCookie(request, "theme"); } return "redirect:" + request.getParameter("url"); }