使用 Spring MVC 的 Twitter Bootstrap [英] Twitter Bootstrap with Spring MVC

查看:30
本文介绍了使用 Spring MVC 的 Twitter Bootstrap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 Twitter Bootstrap 与现有的 Spring MVC 项目集成.搜索返回抽象结果,没有概述如何将专注于 UI 的 Bootstrap 与 Spring MVC 集成的教程或文章.

I'd like integrate Twitter Bootstrap with an existing Spring MVC Project. Search returns abstract results with no tutorials or articles that outlines how to integrate the UI focused Bootstrap with Spring MVC.

集成框架所涉及的配置步骤是什么?

What are the the steps in terms of configuration involved to integrate the frameworks?

谢谢

推荐答案

Twitter Bootstrap 是一个 CSS 元素框架,还有一些弹出窗口和 HTML 技巧.您可以简单地将 bootstap.css、jquery.js 和 bootstrap.js 放入现有的 Spring MVC JSP 页面中.两者一起使用并不是什么秘密.很简单.

Twitter Bootstrap is a framework for CSS elements, and also some popup and HTML tricks. You can simply put your bootstap.css, jquery.js and bootstrap.js into your existing Spring MVC JSP pages. There is no secret to using both together; it's quite simple.

您可以查看这些示例.它们可能对您有用.

You can take a look in those examples. They may be useful to you.

  • Example 1 - priyatam's GitHub Spring MVC bootstrap showcase. This is a good one, a complete project and ready to run
  • Example 2 - Duckranger's Spring MVC and Twitter Bootstap

请记住,Spring MVC 将向您提供所有数据(通过 JSON 或模型属性)来构建您的 HTML 文件.Bootstrap 只会个性化页面的主题,有时还会调用 Spring MVC REST 端点来获取 Ajax 数据.

Remember that Spring MVC will provide to you all data (via JSON or Model attributes) to build yout HTML file. Bootstrap will only personalize the theme of your page and, sometimes, calling Spring MVC REST endpoints to get Ajax data.

这篇关于使用 Spring MVC 的 Twitter Bootstrap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆