springboot项目
不使用thymeleaf模板引擎
想要直接访问html页面
如何做呢
把静态文件(html,js,css)放在resource的static文件夹里面
图中是2个html游戏的文件夹
通过a标签跳转的方式,可以直接前往static文件夹
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8"/>
<title>Title</title>
</head>
<body>
<div align="center">
xionghao.top
<br/>
<a th:href="@{/hello}">hello</a>
<br/>
<a href="/plane/jiaoben6033/index.html">飞机大战</a>
<br/>
<a href="/war/jiaoben5798/index.html">皇室战争</a>
</div>
</body>
</html>
参考博客:SpringBoot直接访问HTML页面