[TOC] # 创建springboot项目 ## 1、点击新建选择project... ![](https://img.kancloud.cn/e5/2c/e52c217322e9c3ec72df9cf5ffc18e7c_600x330.png) ## 2、选择Spring Initializr ![](https://img.kancloud.cn/91/2a/912a60d73fecbb96d54cd315e88fdab4_1191x982.png) ## 3、项目配置 ![](https://img.kancloud.cn/68/66/686688790c6af3d2bb17f04b62bdc6d4_1197x985.png) ![](https://img.kancloud.cn/28/f8/28f8c2b0127d3339b4f43e0d53e71264_1188x986.png) ![](https://img.kancloud.cn/8f/ca/8fca7a7c72d70bafbfe46d15c31a9bd1_1188x982.png) ## 4、完成项目创建 ![](https://img.kancloud.cn/98/11/98118ef6b4c7a94eb5b91e47366ec560_628x307.png) # 项目整理 ## 1、删除掉mvn相关的maven控制 ![](https://img.kancloud.cn/b3/b2/b3b2ee4fbf34e40ae18b7506a4c58f68_720x695.png) ## 2、新增web和lombok的依赖 ``` <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--简化javabean相关操作--> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <scope>provided</scope> </dependency> ``` ## 3、删除application.property 新建application.yml ![](https://img.kancloud.cn/92/49/924931e1838b7d2a52de6d812f97a133_1080x574.png) # 项目运行 ## 1、启动项目 ![](https://img.kancloud.cn/a2/20/a220b31111424d6136d440e5b7d8bebd_627x305.png) ## 2、访问hello 在浏览器中输入: [http://localhost:8090/common/hello/](http://localhost:8090/common/hello/) ![](https://img.kancloud.cn/02/a0/02a0ca4b5d0134b333c4e2f72b8f5f09_670x344.png =500x) 至此我们的springboot项目搭建已经完成。