springboot2学习记录之 加入bootstrap及jquery

下载bootstrap以及jquery,进入到项目/resources/static/(一般都是这种结构):

将下载的文件放进去,以后文件会越来越多,最好分好类:


我们使用springboot默认的thymeleaf配置:

参考地址

在login页面中引入:

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link th:href="@{/bootstrap/bootstrap.min.css}" rel="stylesheet">
    <script th:src="@{/jquery/jquery-3.3.1.min.js}" ></script>
</head>
<body>
    这是登录页面
</body>
</html>

至此,我们已经在页面中接入了bootstrap和jquery。

样例代码:https://download.csdn.net/download/lib_dil/10277600


版权声明:本文为lib_dil原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。