springBoot(2)---hello word

springBoot---hello world

        When learning springBoot, everyone is used to starting from hello world. The last part mainly uses a small case to understand the running idea of ​​springBoot as a whole. Have a macro understanding of springBoot. This article starts to really learn springboot

Hello World

     1. pom.xml file

     1.1. Set the parent of spring boot

   <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
    </parent>

 

     Note: The Spring boot project must set the parent to the spring boot parent, which contains a large number of default configurations, which greatly simplifies our development.

     1.2 Import the web support of spring boot

       <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>      
</dependency>

 

      1.3 Add Spring boot plugin

       <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324730861&siteId=291194637