idea +maven 搭建spring boot 项目
1.创建maven工程
点击next:
点击finish maven项目创建成功!
2.pom.xml文件配置
打开pom.xml并添加一下内容:
org.springframework.boot
spring-boot-starter-parent
2.3.0.RELEASE
3.添加 Classpath 依赖
org.springframework.boot
spring-boot-starter-web
4.编写代码
创建启动类Application—名字自定义
右键运行(8080为默认端口):
测试:http://127.0.0.1:8080/home
测试成功!!!