springboot中如何使用thymeleaf生成静态页面

2025-06-18 13:11:37

1、首先加入spring-boot-starter-thymeleaf依赖。

springboot中如何使用thymeleaf生成静态页面

3、下面是模板文件位置:

springboot中如何使用thymeleaf生成静态页面

5、启动run方法,查看日志,如下:可以看到已完成静态文件生成。

springboot中如何使用thymeleaf生成静态页面

7、打开html文件可以看到,正是我们需要的静态文件。

springboot中如何使用thymeleaf生成静态页面
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢