Closed yuluo-yx closed 1 month ago
spring.cloud.discovery.enabled
and spring.cloud.nacos.discovery.enabled
I'm also confused about this. Do the two configurations have to be set to the same value?
`spring.cloud.discovery.enabled and spring.cloud.nacos.discovery.enabled I'm also confused about this. Do the two configurations have to be set to the same value?
unnecessary. Their relationship is that nacos is the implementation of sc service discovery and registration, and sc's standard
For this scenario, it shouldn't be bug.
The scenario is described as follows:
a consumer is not registered to nacos, but is able to invoke a service provider in the registry.
For the spring.cloud.discovery.enabled
property, it defines a set of auto-assembly configurations for service discovery in the service. Like the spring.cloud.nacos.discovery.registry-enabled
property, when set to false, it disables the loading of all configuration beans related to service discovery, and calls to the registry service cannot be completed.
The workaround is to use spring.cloud.service-registry.auto-registration.enabled
or spring.cloud.nacos.discovery.register-enabled
to disable the service registration and to be able to invoke the provider service.
cc @ruansheng8 @chickenlj
Bgc
When developing with sca, if the service instance does not need to be registered with nacos, it can be configured with
spring.cloud.discovery.enabled=false
:But this configuration is invalid! and causes the following error:
more info see: https://github.com/alibaba/spring-cloud-alibaba/issues/3675
Action
Check the nacos-discovery auto-assembly feature to resolve this issue.
背景
在使用 sca 进行开发时,如果服务实例不需要注册到 nacos,可以通过
spring.cloud.discovery.enabled=false
配置:但是此配置无效!并会引起如下报错:
Action
检查 nacos-discovery 自动装配功能以解决此问题。
more info see: https://github.com/alibaba/spring-cloud-alibaba/issues/3675