查看“Spring Boot 依赖管理特性”的源代码
←
Spring Boot 依赖管理特性
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看和复制此页面的源代码。
https://www.bilibili.com/video/BV19K4y1L7MT/?p=6 === 父项目做依赖管理 === boot-01-helloworld - pom.xml<syntaxhighlight lang="xml"> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.4.RELEASE</version> </parent> </syntaxhighlight> spring-boot-starter-parent-2.3.4.RELEASE.pom<syntaxhighlight lang="xml"> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>2.3.4.RELEASE</version> </parent> <artifactId>spring-boot-starter-parent</artifactId> <packaging>pom</packaging> <name>spring-boot-starter-parent</name> </syntaxhighlight> spring-boot-dependencies-2.3.4.RELEASE.pom<syntaxhighlight lang="xml"> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>2.3.4.RELEASE</version> <packaging>pom</packaging> <properties> <activemq.version>5.15.13</activemq.version> <antlr2.version>2.7.7</antlr2.version> <appengine-sdk.version>1.9.82</appengine-sdk.version> <artemis.version>2.12.0</artemis.version> …… </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-amqp</artifactId> <version>${activemq.version}</version> </dependency> …… </dependencies> </dependencyManagement> </syntaxhighlight>几乎声明了所有开发中常用依赖的版本号,自动版本仲裁机制 如果对自动仲裁的版本不满意,还可以到当前项目的配置文件里进行自定义: # 查看 spring-boot-dependencies 里面规定当前依赖的版本用的 key。 # 在当前项目里面重写<syntaxhighlight lang="xml"> <properties> <mysql.version>5.1.43</mysql.version> </properties> </syntaxhighlight> 各种各样的 starter (场景启动器) https://docs.spring.io/spring-boot/docs/2.7.8/reference/html/using.html#using.build-systems.starters 所有的场景启动器最底层的依赖<syntaxhighlight lang="xml"> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <version>2.3.4.RELEASE</version> <scope>compile</scope> </dependency> </syntaxhighlight>所以一旦依赖了场景启动器,就不用才引入对 spring-boot-starter 的依赖了
返回至
Spring Boot 依赖管理特性
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
Spring Boot 2 零基础入门
Spring Cloud
Spring Boot
设计模式之禅
VUE
Vuex
Maven
算法
技能树
Wireshark
IntelliJ IDEA
ElasticSearch
VirtualBox
软考
正则表达式
程序员精讲
软件设计师精讲
初级程序员 历年真题
C
SQL
Java
FFmpeg
Redis
Kafka
MySQL
Spring
Docker
JMeter
Apache
Linux
Windows
Git
ZooKeeper
设计模式
Python
MyBatis
软件
数学
PHP
IntelliJ IDEA
CS基础知识
网络
项目
未分类
MediaWiki
镜像
问题
健身
国债
英语
烹饪
常见术语
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息