Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

启动discovery-springcloud-example #4

Closed
eratel opened this issue Jul 23, 2018 · 10 comments
Closed

启动discovery-springcloud-example #4

eratel opened this issue Jul 23, 2018 · 10 comments

Comments

@eratel
Copy link

eratel commented Jul 23, 2018

启动discovery-springcloud-example中为什么会使用到consul,不是已经注册到eurek中去了吗?

@Nepxion
Copy link
Collaborator

Nepxion commented Jul 23, 2018

Spring Cloud目前支持四种服务注册中心:
Eureka,Consul,Zookeeper,Etcd(最后一个还在孵化中,没正式发布,所以这里暂时不支持),你选择了Eureka,那就跟Consul没任何关系了

@Nepxion
Copy link
Collaborator

Nepxion commented Jul 23, 2018

开启哪种服务注册中心,自然会去读取对应的配置。example只是示例,你不用它,可以注释掉,但是对于我来说,测试的时候,来回切换注释,会很麻烦,所以索性都放在一起了。总而言之,你用哪个服务注册中心,就在你的配置文件里放哪个配置。

@Nepxion
Copy link
Collaborator

Nepxion commented Jul 23, 2018

请加我微信 1394997,详细探讨

@eratel
Copy link
Author

eratel commented Jul 23, 2018

eureka中的配置并不完善需要添加
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false

@Nepxion
Copy link
Collaborator

Nepxion commented Jul 23, 2018

这个属于如何用Eureka的范畴。只要把我的插件加入进去,原本你怎么用的都不变,配置都不需要做任何修改。但有两个额外配置,我在文档里面也说明了,一个是version,另一个是group或者application

@eratel
Copy link
Author

eratel commented Jul 23, 2018

Nacos是必须要启动的吗?

@Nepxion
Copy link
Collaborator

Nepxion commented Jul 23, 2018

不是必须,启动了就是发布订阅模式,不启动只能通过Rest推送方式,你先看一下视频,界面上有“配置推送模式”的选项

@Nepxion
Copy link
Collaborator

Nepxion commented Jul 23, 2018

但建议你启动Nacos,阿里巴巴Nacos未来很可能取代Eureka和Zookeeper等,可以趁机了解一下

@eratel
Copy link
Author

eratel commented Jul 23, 2018

工程启动并没有出现图形化界面 swagger-ui.html中console Endpoint是有的

@Nepxion
Copy link
Collaborator

Nepxion commented Jul 23, 2018

discovery-console-desktop/com.nepxion.discovery.console.desktop.ConsoleLauncher,启动这个

@Nepxion Nepxion closed this as completed Jul 24, 2018
HaojunRen added a commit that referenced this issue Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant