springboot快速搭建web项目

2024-11-17 20:08:00

1、File->New->Project,选择Spring Initializr,点击next

springboot快速搭建web项目

2、填写项目信息,版本,包名,描述,点击下一步

springboot快速搭建web项目

3、选择需要整合的jar包。这边是搭建web项目,所以选择spring web跟Thymeleaf。之后点击下一步

springboot快速搭建web项目

4、填写项目名称,项目路径。点击Finish完成。之后需要等待一会,IDE会自动配置项目,导入相关的jar包依赖。

springboot快速搭建web项目

5、jar包引用完毕,编写controller,配置项目根路径页面地址

springboot快速搭建web项目

6、编写首页html。之后点击项目运行

springboot快速搭建web项目

7、在浏览器输入localhost:8080访问项目地址。可以看到index.html殳陌抻泥页面。到此,springboot项目创建完成。

springboot快速搭建web项目
猜你喜欢