twitter-bootstrap 使用 Spring MVC 的 Twitter Bootstrap
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15189437/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Twitter Bootstrap with Spring MVC
提问by user1377822
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.
我想将 Twitter Bootstrap 与现有的 Spring MVC 项目集成。搜索返回抽象结果,没有概述如何将专注于 UI 的 Bootstrap 与 Spring MVC 集成的教程或文章。
What are the the steps in terms of configuration involved to integrate the frameworks?
集成框架所涉及的配置步骤是什么?
Thanks
谢谢
回答by Deividi Cavarzan
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.
Twitter Bootstrap 是一个 CSS 元素框架,还有一些弹出窗口和 HTML 技巧。您可以简单地将 bootstap.css、jquery.js 和 bootstrap.js 放入现有的 Spring MVC JSP 页面中。两者一起使用并不是什么秘密。这很简单。
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
- 示例 1 - priyatam 的 GitHub Spring MVC 引导程序展示。这是一个很好的项目,一个完整的项目,可以运行了
- 示例 2 - Duckranger 的Spring MVC 和 Twitter Bootstap
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 将为您提供所有数据(通过 JSON 或模型属性)来构建您的 HTML 文件。Bootstrap 只会个性化页面的主题,有时还会调用 Spring MVC REST 端点来获取 Ajax 数据。
回答by Mohamed Dernoun
this is a good easy tutorial show you how you can integrate a bootstrap to an existing Spring MVC project
这是一个很好的简单教程,向您展示如何将引导程序集成到现有的 Spring MVC 项目中

