尚硅谷springboot学习4-helloworld探究
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探究的更多相关文章
- 尚硅谷springboot学习14-自动配置原理
配置文件能配置哪些属性 配置文件能配置的属性参照 自动配置的原理 1).SpringBoot启动的时候加载主配置类,开启了自动配置功能 @EnableAutoConfiguration 2).@Ena ...
- 尚硅谷springboot学习3-helloworld程序
1.环境准备 –jdk1.8:Spring Boot 推荐jdk1.7及以上:java version "1.8.0_112" –maven3.x:maven 3.3以上版本:Ap ...
- 尚硅谷springboot学习1-简介
以前看过springboot的相关知识,当时偷懒没有做笔记,现在忘得已经差不多了,现在趁着过年有时间,再学习一遍,并做下笔记以备忘. 特性 Spring Boot来简化Spring应用开发,约定大于配 ...
- 尚硅谷springboot学习35-启动原理
先列出几个重要的事件回调机制 配置在META-INF/spring.factories ApplicationContextInitializer SpringApplicationRunListen ...
- 尚硅谷springboot学习34-整合SpringData JPA
SpringData简介
- 尚硅谷springboot学习33-整合mybatis
引入mybatis依赖(还要引入mysql和jdbc依赖) <dependency> <groupId>org.mybatis.spring.boot</groupId& ...
- 尚硅谷springboot学习31-jdbc数据连接
可以使用JdbcTemplate操作数据库,可以在启动的时候自动建表,更新数据表 配置依赖 <dependency> <groupId>org.springframework. ...
- 尚硅谷springboot学习27-使用外置servlet容器
嵌入式Servlet容器:应用打成可执行的jar 优点:简单.便携: 缺点:默认不支持JSP.优化定制比较复杂(使用定制器[ServerProperties.自定义EmbeddedServle ...
- 尚硅谷springboot学习26-嵌入式servlet容器自动配置、启动原理
EmbeddedServletContainerAutoConfiguration:嵌入式的Servlet容器自动配置 @AutoConfigureOrder(Ordered.HIGHEST_PREC ...
随机推荐
- centos7图形化界面安装后,意外出现Please make your choice from above ['q' to quit | 'c' to continue | 'r' to refresh]
安装完成centos7-GUI后出现如下提示: nitial setup of CentOS Linux (core) ) [x] Creat user ) [!] License informati ...
- 05-RARP: 逆地址解析协议
具有本地磁盘的系统引导时,一般是从磁盘上的配置文件中读取I P地址.但是无盘机,如X终端或无盘工作站,则需要采用其他方法来获得I P地址. 网络上的每个系统都具有唯一的硬件地址,它是由网络接口生产厂家 ...
- JS的正则表达式简介
1.JS的正则表达式 1.1 简介 JS的正则表达式比较简单,总体上只分为两个功能:一个是test——用于匹配字符串是否符合规定的正则表达式规则:另外一个是exec——用于获取匹配到的数据. 1.2 ...
- Jmeter(十七)Logic Controllers 之 Interleave Controller
Interleave Controller----交错控制器,对于交错控制器官方文档解释的很清楚,上例子: 可以看到运行一次 Interleave Controller下的Sampler,运行一次 I ...
- [UE4 ]Is Locally Controlled的局限性
一.在有机器人的游戏中,就不能使用IsLocallyControlled判断.而是要使用这个方法: 二.因为机器人也是属于本地控制的角色.所以不能使用IsLocallyControlled判断是否是本 ...
- Redis进阶实践之十三 Redis的Redis-trib.rb脚本文件使用详解
转载来源:http://www.cnblogs.com/PatrickLiu/p/8484784.html 一.简介 事先说明一下,本篇文章不涉及对redis-trib.rb源代码的分析,只是从使用的 ...
- sas 命令行打开SAS IDE 的代码
"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\Program Files\SASHom ...
- Apache提供的dbUtils
一.介绍 apache组织为我们提供了dbUtils实用工具(一些jar包),封装了一些查询的类和借口,相对自己定义的来说,可以简化很多操作 dbUtils提供了核心功能 1.QueryRunner ...
- hive spark版本对应关系
查看hive source下面的pom.xml,可以找到官方默认发布的hive版本对应的spark版本,在实际部署的时候,最好按照这个版本关系来,这样出现兼容问题的概率相对较小. 下面面列出一部分对应 ...
- php引用变量
引用变量:在php中引用意味着用不同的名字访问同一个变量内容 定义方式:& 总结:$b=&$a其中$b是取到了$a的地址,随着$a的地址变化,不会重新开辟空间可以根据他们的内存占用情况 ...