springboot整合前端页面thymeleaf

step1:

拷贝代码:https://github.com/caiwangmeng/springboot-thymeleaf

step2:

解压,idea open 文件夹位置,会自动初始化一些配置文件,多出.idea文件夹等.

step3:

自动下载依赖,编译之后,配置外部Tomcat,链接:  https://blog.csdn.net/duoduo1636546/article/details/81332986

此处项目名请配置app,否则启动后js加载不了,以后自行修改。

step4:

启动Tomcat后,弹出如下界面表示页面跳转成功:

新项目构建及解释:

1.创建springboot工程,将其改为war包形式,链接:https://blog.csdn.net/javahighness/article/details/52515226

2.配置文件:

3.新建页面,新建controller

4.可能出错的地方

猜你喜欢

转载自blog.csdn.net/duoduo1636546/article/details/81392355