等待导入jar包
3.maven配置
我新建的项目需要额外导入 spring-boot-starter-web这个不知到是怎么回事。
静态页面使用thymeleaf 这个可以在https://spring.io/guides中找到 引入jar包即可
需要新建这样的目录结构
在application文件中右键启动项目
有可能存在找不到页面的错误
template might not exist or might not be accessible by any of the configured Template Resolvers
解决方法:
在maven中导入
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
即可
修改端口号