下载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。