之前有弄过简单jsp的例子,如今在springboot中尝试,发现springboot非常简洁,而且实现起来非常轻松,不多说,直接上码。
从页面开始:HTML
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>人脸识别</title>
<script src="plugin/js/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="plugin/js/bootstrap.min.js"></script>
<link href="plugin/css/bootstrap.min.css" th:href="@{/plugin/css/bootstrap.min.css}" rel="stylesheet">
</head>
<body>
<video width="400" height="300"></video>
<!-- 图像画布 -->
<canvas width="200" height="150"></canvas>
<button id="" onclick="face_login()" class="btn btn-info&#