You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what problem you have encountered
In relevant versions of spring-cloud-starter-alibaba-nacos-discovery from branch of 2.2.x, we add following dependency in it.
For outside user, they just need to add spring-cloud-starter-alibaba-nacos-discovery, then can call downstream service directly.
But in relevant versions of spring-cloud-starter-alibaba-nacos-discovery from branch of 2021.x, Spring Cloud remove Ribbon from 2020.0.0, we did some adjustments, we use following loadbalancer module replacing Ribbon:
This piece is consistent with spring-cloud-netflix-eureka-client. Because of the optional attribute set to true, users need to add spring-cloud-starter-alibaba-nacos-discovery in addition to adding spring-cloud-loadbalancer to new applications manually. Otherwise the application cannot normally consume services. Setting the optional attribute to true in spring-cloud-starter-alibaba-nacos-discovery has the following benefits:
Reduce the size of the spring-cloud-starter-alibaba-nacos-discovery dependency report. If the application is not a consumer, it does not need to add redundant spring-cloud-loadbalancer dependencies.
Let the user clearly know what load balancing component he/she is using.
shortcoming:
The threshold for application construction has been raised. For beginners of Spring Cloud, it is easy to forget the spring-cloud-loadbalancer dependency for the first time.
Some users suggested that the community remove optional attributes from subsequent versions in branch of 2021.x, so that they no longer need to manually add spring-cloud-loadbalancer dependencies. What do you think?
The text was updated successfully, but these errors were encountered:
Yes, when I first started learning about spring-cloud, I would look at sample demos or watch instructional videos, or look up examples on github to build apps. There are very few problems with forgetting to add dependencies, copy and paste is always the best option for me. I think this kind of problem is more likely to occur when legacy systems are upgraded or version updated.
I agree with this, and I want to be able to control what dependencies are used in the application I'm building, otherwise there will be a lot of trouble if something goes wrong.
Which Component
eg. Nacos Discovery
Describe what problem you have encountered
In relevant versions of
spring-cloud-starter-alibaba-nacos-discovery
from branch of 2.2.x, we add following dependency in it.For outside user, they just need to add
spring-cloud-starter-alibaba-nacos-discovery
, then can call downstream service directly.But in relevant versions of
spring-cloud-starter-alibaba-nacos-discovery
from branch of 2021.x, Spring Cloud remove Ribbon from 2020.0.0, we did some adjustments, we use following loadbalancer module replacingRibbon
:This piece is consistent with
spring-cloud-netflix-eureka-client
. Because of the optional attribute set totrue
, users need to addspring-cloud-starter-alibaba-nacos-discovery
in addition to addingspring-cloud-loadbalancer
to new applications manually. Otherwise the application cannot normally consume services. Setting the optional attribute totrue
inspring-cloud-starter-alibaba-nacos-discovery
has the following benefits:spring-cloud-starter-alibaba-nacos-discovery
dependency report. If the application is not a consumer, it does not need to add redundantspring-cloud-loadbalancer
dependencies.shortcoming:
spring-cloud-loadbalancer
dependency for the first time.Some users suggested that the community remove optional attributes from subsequent versions in branch of 2021.x, so that they no longer need to manually add
spring-cloud-loadbalancer
dependencies. What do you think?The text was updated successfully, but these errors were encountered: