Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

在一个单体项目中,如果不使用microservice,同样可以使用注入的方式,对service中的方法进行调用。microservice除了支持一些消息介质(如mq、rpc等)外,看起来与普通service的作用一样。那么两者之间的本质差别是什么?

You must be logged in to vote

Replies: 3 comments

Comment options

本质是一个挂了不影响另一个啊,,微服务的优点,,

You must be logged in to vote
0 replies
Comment options

可能我的打开方式不对,在一个项目里去验证demo了
但很疑惑如果是不同的项目之间,为什么在官网文档里没有看到不同端口或者不同IP的定义,难道只通过引入相同名字的客户端就能通信了吗?
Uploading image.png…

You must be logged in to vote
0 replies
Comment options

文档里还是有定义host和port的地方的

image

只是代码例子中没有采用的是默认host为localhost,默认port为3000。可以按照官网例子定义两个项目通过微服务进行通讯,过程中关闭接受方,再进行测试会发现提示“connect ECONNREFUSED 127.0.0.1:3000”

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
2-Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.