一、IDEA联网创建新工程

1.创建一个SpringBoot工程

(1)创建新模块
        
(2)选择当前模块所需技术集
        
(3)进行开发(略)
(4)运行项目自动生成的Application类
        运行SpringBoot程序通过运行这个Application程序入口来进行。
        
        

2.SpringBoot与Spring的对比

        Spring依赖和配置起来比较繁琐,而SpringBoot简化了依赖配置(起步依赖)和工程的相关配置(自动配置),并提供了一些辅助功能(如内置服务器等)。
         

3.隐藏模板无关文件

        
        非手动制作(四)SpringBoot项目时,会随项目创建产生一些模板文件(如图),如何隐藏这些文件呢?
                

二、通过SpringBoot官网创建新工程

1.快速创建SpringBoot项目
        
        
2.配置模块基本信息
        
        
        
3.下载SpringBoot项目并导入IDEA
        
        
        
4.进行开发
5.运行程序

三、通过阿里云创建SpringBoot项目

1.创建新模块并修改Server URL
        
2.选择当前模块所需技术集
【tips】若想修改SpringBoot版本,直接在pom.xml中修改即可
        
3.进行开发
4.运行程序

四、手工制作SpringBoot项目

1.创建无骨架maven工程
2.补充pom.xml文件
(1)继承
<!--继承-->
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.6.11</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
(2)依赖
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>
3.创建带main()的引导类Application
@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);//该application类的class文件
    }
}
4.开发
5.运行