Spring Boot学习笔记一:搭建spring boot
2020-03-11 本文已影响0人
神小六
因为一直在springboot框架上面新增修改功能,没有深入了解一下spring boot,所以打算开始从搭建spring boot框架开始慢慢开始学习spring boot。
首先创建一个项目,创建时选择Spring Initializr,然后Next,如下图:

然后填写项目信息

然后勾选用到的技术,选择web,Next

然后填写项目名称,Finish

这时候新建springboot项目已经完成。
这时候会去下载需要的依赖等,时间会稍微有点久
成功后springboot会默认生成三个文件:
1、pom.xml
2、application.properties
3、TextSpringBootApplication(启动类文件)

TextSpringBootApplication类,这是我们整个项目的入口类,这个类有一个@SpringBootApplication注解,这是整个Spring Boot的核心注解,它的目的就是开启Spring Boot的自动配置
然后验证一下,新建一个类:Text


然后点击项目启动按钮运行

然后在浏览器中访问

至此成功的从浏览器中访问到了,一个简单的Spring Boot工程已经创建出来了。