现在动静分离很多,静态页面几乎都还存在浏览器,
这里说的是用thymeleaf渲染前台数据时,后台直接把整个HTML页面代码缓存到redis中,请求直接返回整个页面
SpringWebContext ctx = new SpringWebContext(request,response,
request.getServletContext(),request.getLocale(), model.asMap(), applicationContext );
html = thymeleafViewResolver.getTemplateEngine().process("login", ctx);
这么一段话,主要是用到了ThymeleafViewRresolver,集成thymeleaf直接注入就好