目录
百战程序员,全站22050+开发课程+文档 ,学习精选优质好课快人一步!观看视频 快捷键ALT+N

微服务 教程

1085个小节阅读:196.1k

收藏
全部开发者教程

C语言快速入门

JAVA全系列 教程

面向对象的程序设计语言

Python全系列 教程

Python3.x版本,未来主流的版本

人工智能 教程

顺势而为,AI创新未来

大厂算法 教程

算法,程序员自我提升必经之路

C++ 教程

一门通用计算机编程语言

微服务 教程

目前业界流行的框架组合

web前端全系列 教程

通向WEB技术世界的钥匙

大数据全系列 教程

站在云端操控万千数据

AIGC全能工具班

A

A A

White Night

阅读(186)
赞(0)

SpringBoot原理分析_起步依赖

image-20211231105811975

查看spring-boot-starter-parent起步依赖

  1. 按住Ctrl点击pom.xml中的spring-boot-starter-parent,跳转到了spring-boot-starter-parentpom.xml,发现spring-boot-starter-parent的父工程是spring-boot-dependencies

    image-20220117103457700

  2. 进入spring-boot-dependenciespom.xml可以看到,一部分坐标的版本、依赖管理、插件管理已经定义好,所以SpringBoot工程继承spring-boot-starter-parent后已经具备版本锁定等配置了。所以起步依赖的作用就是进行依赖的传递。

    image-20211230184531751

查看spring-boot-starter-web起步依赖

按住Ctrl点击pom.xml中的spring-boot-starter-web,跳转到了spring-boot-starter-webpom.xml,从spring-boot-starter-webpom.xml中我们可以发现,spring-boot-starter-web就是将web开发要使用的spring-webspring-webmvc等坐标进行了打包,这样我们的工程只要引入spring-boot-starter-web起步依赖的坐标就可以进行web开发了,同样体现了依赖传递的作用。

image-20220117103550175

实时学习反馈

1. 在SpringBoot中,起步依赖的作用是

A 依赖传递

B 依赖跳转

C 依赖分离

D 以上都不正确

答案

1=>A

 

北京市昌平区回龙观镇南店村综合商业楼2楼226室

©2014-2023 百战卓越(北京)科技有限公司 All Rights Reserved.

京ICP备14032124号-2