Note: Introduced is the version parent project of SpringBoot2.0.3.RELEASE

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.03..RELEASE</version>
</parent>
Copy the code

The first:

By starting the class: use@SpringBootApplicationannotations

Add plugins to the project and select RunAs –> Maven Bulid… Type spring-boot :run and click run

<plugins>
         <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin><! -- Maven's JDK compiled version plug-in, here because the parent project is2.0. 0Version, if yes1.54.The version does not need to import JDK --><plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
      </plugins>
Copy the code

Third: in the root directory of the current project, where the POM.xml file is located

Holding down the Shift key while right-clicking the mouse will open herepowerShellThen click to enter the interfacemvn spring-boot:runThe following screen appears. The current interface is after downloading the JAR package that the POM file depends on. After downloading, you can access it normally.