SpringBoot快速入门
1. 目标
-
搭建SpringBoot环境
-
完成:开发一个web应用并完成字符串“hello springboot”在浏览器显示。
2. 讲解
实现步骤:
- 创建maven工程
- 导入相关依赖的jar包(例如:spring-web、spring-webmvc等)
- 编写springmvc核心配置文件
- 编写web.xml文件
- 编写XxxController
SpringBoot实现
-
方式一
(1)创建maven工程
创建一个maven工程(建议:java工程,也可以是web工程),无需勾选maven骨架。
1、添加起步依赖(依赖一个父工程)
2、添加web依赖
引来如下:
<!--父工程-->
<parent>
&