1、POM文件

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

  他的父项目是

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath>../../spring-boot-dependencies</relativePath>
</parent>

  他来真正管理Spring Boot应用里面的所有依赖版本;是Spring Boot的版本仲裁中心;以后我们导入依赖默认是不需要写版本;(没有在dependencies里面管理的依赖自然需要声明版本号)

  2、启动器

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

  spring-boot-starter:spring-boot场景启动器;帮我们导入了web模块正常运行所依赖的组件;

  Spring Boot将所有的功能场景都抽取出来,做成一个个的starters(启动器),只需要在项目里面引入这些starter相关场景的所有依赖都会导入进来。要用什么功能就导入什么场景的启动器

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starters</artifactId>
<version>1.5.19.RELEASE</version>
</parent>
<artifactId>spring-boot-starter-web</artifactId>
<name>Spring Boot Web Starter</name>
<description>Starter for building web, including RESTful, applications using Spring
MVC. Uses Tomcat as the default embedded container</description>
<url>http://projects.spring.io/spring-boot/</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>http://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
</dependencies>
</project>

尚硅谷springboot学习4-helloworld探究的更多相关文章

  1. 尚硅谷springboot学习14-自动配置原理

    配置文件能配置哪些属性 配置文件能配置的属性参照 自动配置的原理 1).SpringBoot启动的时候加载主配置类,开启了自动配置功能 @EnableAutoConfiguration 2).@Ena ...

  2. 尚硅谷springboot学习3-helloworld程序

    1.环境准备 –jdk1.8:Spring Boot 推荐jdk1.7及以上:java version "1.8.0_112" –maven3.x:maven 3.3以上版本:Ap ...

  3. 尚硅谷springboot学习1-简介

    以前看过springboot的相关知识,当时偷懒没有做笔记,现在忘得已经差不多了,现在趁着过年有时间,再学习一遍,并做下笔记以备忘. 特性 Spring Boot来简化Spring应用开发,约定大于配 ...

  4. 尚硅谷springboot学习35-启动原理

    先列出几个重要的事件回调机制 配置在META-INF/spring.factories ApplicationContextInitializer SpringApplicationRunListen ...

  5. 尚硅谷springboot学习34-整合SpringData JPA

    SpringData简介

  6. 尚硅谷springboot学习33-整合mybatis

    引入mybatis依赖(还要引入mysql和jdbc依赖) <dependency> <groupId>org.mybatis.spring.boot</groupId& ...

  7. 尚硅谷springboot学习31-jdbc数据连接

    可以使用JdbcTemplate操作数据库,可以在启动的时候自动建表,更新数据表 配置依赖 <dependency> <groupId>org.springframework. ...

  8. 尚硅谷springboot学习27-使用外置servlet容器

    嵌入式Servlet容器:应用打成可执行的jar ​ 优点:简单.便携: ​ 缺点:默认不支持JSP.优化定制比较复杂(使用定制器[ServerProperties.自定义EmbeddedServle ...

  9. 尚硅谷springboot学习26-嵌入式servlet容器自动配置、启动原理

    EmbeddedServletContainerAutoConfiguration:嵌入式的Servlet容器自动配置 @AutoConfigureOrder(Ordered.HIGHEST_PREC ...

随机推荐

  1. BloomFilter理解

    知道BloomFilter是因为RocksDB数据库中用到了这个技术,用于判断1个数据是否存在于1个SST文件中. BloomFilter可能存在误判,就是判断数据是存在集合中,而实际上可能不存在,概 ...

  2. C/S模型服务端vsftpd的安装与卸载

    c/s模型 连接光驱DVD 设置环境(软件安装的环境) mkdir /mnt/yw----------------------(创建一个在mnt下yw目录) mount /dev.sr0 /mnt/y ...

  3. Jmeter(三十四)Jmeter-Question之“Cookie获取”

    2018.4.27 还在做性能测试的过程中,唉,只能说坑很多. 无明确需求.无人手协调等问题,什么都需要自己去挖掘. 本次测试的工具选型依然是Jmeter,真实场景中遇到了这么个问题.可能解决办法有点 ...

  4. [UE4]函数参数引用

    函数传递的变量可以当做正常的内部变量使用,而不需要把函数变量赋值给新创建一个内部变量.

  5. 使用LiteOrm删除数据对象失败的坑

    使用 LiteOrm.newSingleInstance(BaseApplication.getInstance(), Constant.DB_NAME); 在不同进程中创建了两次对象,在保存和删除的 ...

  6. c#day02

    using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace testmys ...

  7. day1作业(格式化输出)

    练习:用户输入姓名.年龄.工作.爱好 ,然后打印成以下格式------------ info of Egon -----------Name  : EgonAge   : 22Sex   : male ...

  8. Python strip lstrip rstrip使用方法(字符串处理空格)

    Python strip lstrip rstrip使用方法(字符串处理空格)   strip是trim掉字符串两边的空格.lstrip, trim掉左边的空格rstrip, trim掉右边的空格 s ...

  9. WPF datagrid 设置表头线与颜色、透明度

    <!--数据网格的列标题样式属性--> <DataGrid.ColumnHeaderStyle> <!--样式类型:DataGridColumnHeader(数据网格列标 ...

  10. Java实现图像对比类

    package com.function; import java.awt.image.BufferedImage; import java.io.BufferedWriter; import jav ...