gpt4 book ai didi

spring-mvc - 在 SpringMVC 应用程序中集成 Twitter Bootstrap

转载 作者:行者123 更新时间:2023-12-04 07:28:07 26 4
gpt4 key购买 nike

我开始使用 SpringMVC 构建基本应用程序。同时,我想使用一些易于设置的 UI 框架,例如 Twitter Bootstrap。但是,不知道如何设置它。

问题:

  1. 我将下载的 Bootstrap 文件夹放在哪里?

enter image description here

enter image description here enter image description here

到目前为止我有什么。

最佳答案

我会将这些放在 src/main/resources 中,而不是在 WEB-INF 下。这些不需要保护。

此外,请确保根据 documentation 告诉 Spring 它们在调度程序 servlet 配置文件中的位置.

<mvc:resources mapping="/resources/**" location="/resources/" />

如果您也使用 Spring 安全性,则需要确保资源不 protected 。

<http pattern="/resources/**" security="none"/>

关于spring-mvc - 在 SpringMVC 应用程序中集成 Twitter Bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12784992/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com