spring-cloud-alibaba Starter should bring at least "spring-boot-starter"

j9per5c4  于 4个月前  发布在  Spring
关注(0)|答案(4)|浏览(100)

Trying to upgrade to Spring Cloud Alibaba 2.2.1 on start.spring.io, our verification tests started to fail. The starters in this release no longer brings spring-boot-starter so they are effectively invalid.

3vpjnl9f

3vpjnl9f1#

hi @snicoll , sorry for late reply.

Could you please share some more details about verification tests(It is a test case program?). we can make sure our starters are valid if we know how it runs 😄 .

Thanks!

shstlldc

shstlldc2#

If you resolve dependencies for any starter, the dependency tree should container org.springframework.boot:spring-boot-starter in compile scope.

yhived7q

yhived7q3#

Sorry, I can't understand, for instance, spring-cloud-starter-alibaba-nacos-config artifact adds the dependency :

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <optional>true</optional>
        </dependency>

The default scope of this dependency declaration is "compile", however, it's an optional and non-transitive one.

w8rqjzmb

w8rqjzmb4#

It can't be be transitive (i.e. <optional>true</optional> ). That's specifically what the the link I provided states. A starter can't declare that spring-boot-starter is optional as it isn't really.

Try to to create a new app from start.spring.io, put only spring-cloud-starter-alibaba-nacos-config (and only that) and try to compile the project and you'll understand what I mean.

相关问题