spring.provides 不再使用

Remove spring.provides files

It does use pom parsing indirectly, since aether parses the poms. The info may look like its duplicating information but it isn’t exactly. The provides is used to resolve ambiguity. Basically if a provides file says that a ‘starter S provides X’… then ‘S’ takes priority over other things that also provide it.

It is surprising how many things end up multiple times in the dependency graph reachable from severral different things. The provides files were added to avoid some surprising/unwanted suggestions. Think of the provides file as a very strong hint to the ide that a boot developer thought ‘if I want to add X to my pom, you should use starter S’. The dependencies inferred from pom are often just accidental and not as ‘deliberate’. (Heuristics like dependency’s depth in the graph were explored but didn’t provide good results).

@dsyer helped with populating the provides files. This was a long time ago and i’m not sure if it has been kept up to date, so the quality of the info in the various provides file may not be as good/complete as it once was. It has also been a bit of a controversial feature. I’m sure a few people like it, but there’s also a lot of folks who have asked how to turn it of.

具体详见 https://github.com/spring-projects/spring-boot/issues/12435

Stop relying on spring.provides files before Spring Boot 2.1 is GA
spring boot 2.1 GA 后不再依赖 spring.provides

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值