名词解释: 
BOM(bill of materials):材料清单,用于解决jar包依赖的好方法。

Spring IO Platform

缘起:Spring起初只专注ioc和aop,现在已发展成一个庞大体系。比如security、mvc等。如此一来,不同模块或者与外部进行集成时,依赖处理就需要各自对应版本号。比如,较新spring与较老的quartz,它们集成就会遇到问题,给搭建和升级带来不便。因此Spring IO Platform应运而生,只要项目中引入了它,外部集成时依赖关系无需版本号。官网的原文如下:“when you do declare a dependency on something that’s part of the Platform, you will now be able to omit the version number.” 
举例如下:

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
</dependency>
</dependencies>

Spring IO Platform只是一个pom文件,记录了spring与其他开源项目对应的版本。省去了版本号,也就省去了处理依赖时的问题,因为Spring IO Platform中有最优的版本配置。

Spring相关的BOM

当然SpringSource为了解决这些Jar冲突,推出了各种BOM,当然最著名的就是spring platform io bom,其中最核心的三个是:spring-framework-bom、spring-boot-dependencies、platform-bom。

对于Spring工程来说,直接在pom.xml文件中添加如下配置代码,即可免去管理版本冲突的难题。

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>4.2.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.3.0.M2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>1.1.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

参考文章

  1. Introduction to spring io platform

解决jar包依赖:Spring IO platform推出bom的更多相关文章

  1. 解决jar包依赖冲突(idea)

    在IDEA状态下查看项目依赖的关系 关系如下图 红色数据jar包冲突 在对应的依赖中出去去冲突依赖

  2. 【maven】排除maven中jar包依赖的解决过程 例子:spring cloud启动zipkin,报错maven依赖jar包冲突 Class path contains multiple SLF4J bindings.

    一直对于maven中解决jar包依赖问题的解决方法纠结不清: 下面这个例子可以说明一个很简单的解决方法: 项目启动报错: Connected to the target VM, address: '1 ...

  3. Spring IO Platform 解决Spring项目组合中版本依赖

    简介: Spring IO Platform是Spring官网中排第一位的项目.它将Spring的核心API集成到一个适用于现代应用程序的平台中.提供了Spring项目组合中的版本依赖.这些依赖关系是 ...

  4. mavn jar包依赖冲突解决

    背景:使用maven很方便,但是引入冲突也很常见.后果很严重,各种不明实体找不到,所以需要对jar包的依赖有一个清晰的认识. 查看冲突 参考:用dependency:tree查看maven引入jar包 ...

  5. IDEA从Github中Clone Maven项目,解决树形目录及Jar包依赖的问题

    很多人在开发中都会碰到的一个问题,当我们用IDEA从Github中检出Maven工程后(Java),发现既不能运行,也不能编译,左侧的树形目录还怪怪的,现在就来说说如何解决这个问题. IDEA从git ...

  6. idea在maven中引入了jar包依赖,但是编译过程中报出XXX程序包不存在,已解决

    idea在maven中引入了jar包依赖,但是编译过程中报出XXX程序包不存在 1. 报错具体情况 2. Project Structure中的Libraries没有任何红色波浪线 3. 发现自己要引 ...

  7. Spring IO Platform介绍

    为什么要用Spring IO Platform 今天无意间看到了一个关键词:"Spring IO Platform",第一直觉是不是有关于IO方面的框架或者包呢,查了一下,居然是为 ...

  8. Spring IO Platform简介及示例

    什么是Spring IO Platform Spring IO Platform,简单的可以认为是一个依赖维护平台,该平台将相关依赖汇聚到一起,针对每个依赖,都提供了一个版本号: 这些版本对应的依赖都 ...

  9. Spring IO platform 简介

    前提:熟悉Spring基础知识. 简介:Spring IO Platform将 the core Spring APIs 集成到一个Platform中.它提供了Spring portfolio中的大量 ...

随机推荐

  1. hihoCoder 1233 : Boxes(盒子)

    hihoCoder #1233 : Boxes(盒子) 时间限制:1000ms 单点时限:1000ms 内存限制:256MB Description - 题目描述 There is a strange ...

  2. mathType换行等号对齐

    例如: 输入步骤: (1) (2) (3) (4) 事实上,[ctrl+;]表示的是插入了一个对齐标记符.

  3. mysql基本知识总结

    第一天 create database act_web character set utf8; : 创建数据库并设立编码(命令中是不允许使用“-”的) '; :创建用户并设立密码 grant all ...

  4. hrbust 2080链表 【贪心】

    仔细看题想想就是个贪心题,两个sort就可以解决了 #include<stdio.h> #include<string.h> #include<math.h> #i ...

  5. [osg][osgEarth][osgGA][原] EarthManipulator------基于oe的相机漫游器(浅析)

    知识基础:osg漫游器基础 class OSGEARTHUTIL_EXPORT EarthManipulator : public osgGA::CameraManipulator EarthMani ...

  6. JDBC的通用查询的方法

    PreparedStatement 1.Why 1):使用Statement需要进行拼写SQL语句,很辛苦,而且容易出错. 2):使用Statement可以发生SQL注入. SQl注入: SQL注入是 ...

  7. linux c/c++ 获取文件大小

    linux c/c++ 获取文件大小 #include <sys/stat.h> int FileSize(const char* fname) { struct stat statbuf ...

  8. Vim 8.0

    安装Vim 8.0yum install ncurses-devel wget https://github.com/vim/vim/archive/master.zip unzip master.z ...

  9. Java获得日期相差的天数

    文章来源: http://www.jb51.net/article/75551.htm 这篇文章主要介绍了java计算两个时间相差天数的方法,感兴趣的小伙伴们可以参考一下: 问题描述: 输入:两个日期 ...

  10. AtCoder Regular Contest 103 E Tr/ee

    Tr/ee 思路:按照下图所示连接 代码: #pragma GCC optimize(2) #pragma GCC optimize(3) #pragma GCC optimize(4) #inclu ...