解决jar包依赖:Spring IO platform推出bom
2017-08-09 14:40
405 查看
名词解释:
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.”
举例如下:
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文件中添加如下配置代码,即可免去管理版本冲突的难题。
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>
相关文章推荐
- 解决jar包依赖:Spring IO platform推出bom
- 解决jar包依赖:Spring IO platform推出bom
- J2ee项目从0搭建(五):最新Spring下载(BOM解决jar包依赖)、集成
- 浅谈Spring解决jar包依赖的bom
- Spring IO Platform:解决依赖版本冲突
- Spring IO Platform 作为Spring官网的排位第一的项目,解决Spring项目组合中版本依赖
- spring tool suite juno 创建spring mvc 项目及遇到无法把maven依赖jar包发布到服务器下解决
- spring maven项目解决依赖jar包版本冲突方案
- Spring学习总结(22)——Spring-framework-bom解决spring的不同模块依赖版本不同问题
- Spring相关的BOM,有效解决不同模块依赖版本问题
- springboot打jar/war包解决第三方依赖jar包的问题
- 怎么spring security 和maven,spring,结合jar包冲突和依赖关系问题解决办法。
- Spring Tool Suite无法现在aspectjweaver.jar这个Maven依赖问题解决
- 因Spring AOP导致@Autowired依赖注入失败的解决方法
- Maven查找依赖树,解决jar包冲突问题
- 【解决】spring中集成hessian报异常,ClassNotFoundException:com.caucho.hessian.io.HessianDebugOutputStream
- maven 依赖本地jar 打包的问题以及解决方式
- maven项目由于多个依赖中含有同一个jar包导致的冲突问题的解决办法
- Maven解决jar包依赖冲突
- 异常解决 java.io.FileNotFoundException: class path resource [spring/applicationContext_*.xml]