springBoot(2)---hello word

springBoot---hello world

        学习springBoot,大家都习惯从hello world,上篇主要是通过一个小案例,来整体理解springBoot的运行思路。对springBoot有个宏观认识。这篇开始真正学习springboot

Hello World

     1. pom.xml文件

     1.1.   设置spring boot的parent

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

     说明:Spring boot的项目必须要将parent设置为spring boot的parent,该parent包含了大量默认的配置,大大简化了我们的开发。

     1.2导入spring boot的web支持

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

      1.3 添加Spring boot的插件

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

猜你喜欢

转载自www.cnblogs.com/qdhxhz/p/8486635.html