课堂笔记:
0. 引入Springboot的parent包,引入Springboot的starter-web包
在Spring官网中,使用快捷工具生成一个HelloWord项目 Spring Initializr
参照这个项目,在IDEA中创建一个新的项目,并配置maven的pom.xml如下
4.0.0 org.springframework.boot spring-boot-starter-parent2.3.5.RELEASE cn.xueyuan.springboot helloworld1.0-SNAPSHOT org.springframework.boot spring-boot-starter-weborg.springframework.boot spring-boot-starter-testtest org.springframework.boot spring-boot-maven-plugin2.3.5.RELEASE
1. 创建Controller
2. 创建启动类Application
启动项目,并测试:localhost:8080/hello/world
3. 创建配置文件Application.properties,手动修改servlet相关配置
4. 打包HelloWorld项目并部署
通过java -jar运行,则自动部署Springboot项目成功



