spring boot thymeleaf模版集成bootstrap和jquery
spring boot的所有静态资源是放在 /src/main/resource/static目录下
直接复制bootstrap目录和jquery文件放到这个目录里,在网页中可以进行如下
引入
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<link th:href="@{bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{bootstrap/css/bootstrap.css}" rel="stylesheet"/>
<script th:src="@{jquery-3.3.1.min.js}" type="text/javascript"></script>
<script th:src="@{bootstrap/js/bootstrap.min.js}"></script>
<meta charset="UTF-8">
spring boot的所有静态资源是放在 /src/main/resource/static目录下
直接复制bootstrap目录和jquery文件放到这个目录里,在网页中可以进行如下
引入
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<link th:href="@{bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{bootstrap/css/bootstrap.css}" rel="stylesheet"/>
<script th:src="@{jquery-3.3.1.min.js}" type="text/javascript"></script>
<script th:src="@{bootstrap/js/bootstrap.min.js}"></script>
<meta charset="UTF-8">