首先导入依赖
<dependency> <groupId>org.webjars</groupId> <artifactId>bootstrap</artifactId> <version>3.3.5</version> </dependency> <dependency> <groupId>org.webjars</groupId> <artifactId>jquery</artifactId> <version>3.1.1</version> </dependency>
然后把后台功能写完,写前端,代码如下
<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"> <title>学生成绩</title> <script src="webjars/jquery/3.1.1/jquery.min.js" th:src="@{webjars/jquery/3.1.1/jquery.min.js}"/> <script src="webjars/bootstrap/3.3.5/js/bootstrap.min.js" th:src="@{webjars/bootstrap/3.3.5/js/bootstrap.min.js}"/> <link href="webjars/bootstrap/3.3.5/css/bootstrap.min.css