現在動靜分離很多,靜態頁面幾乎都還存在瀏覽器,
這裏說的是用thymeleaf渲染前臺數據時,後臺直接把整個HTML頁面代碼緩存到redis中,請求直接返回整個頁面
SpringWebContext ctx = new SpringWebContext(request,response,
request.getServletContext(),request.getLocale(), model.asMap(), applicationContext );
html = thymeleafViewResolver.getTemplateEngine().process("login", ctx);
這麼一段話,主要是用到了ThymeleafViewRresolver,集成thymeleaf直接注入就好