-
Notifications
You must be signed in to change notification settings - Fork 827
JAV-30 Auto Configration code for spring-boot-starter-discovery #27
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
Conversation
java-chassis-dependencies/pom.xml
Outdated
<version>0.1.0-m2-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.servicecomb</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the conflict resolving with master is not right. these dependencies were missing and removed on master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, will fix it
java-chassis-dependencies/pom.xml
Outdated
<artifactId>java-chassis-core</artifactId> | ||
<version>0.1.0-m2-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, will remove this
<groupId>io.servicecomb</groupId> | ||
<artifactId>provider-springmvc</artifactId> | ||
</dependency> | ||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grpc module was removed already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay will remove this
if (null == this.client) { | ||
this.client = RegistryClientFactory.getRegistryClient(); | ||
try { | ||
this.client.init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase onto branch JAV-30_discovery_client. this method shall not throw any exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay will remove try_catch block
java-chassis-dependencies/pom.xml
Outdated
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-netflix-core</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation is not right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
TestMgr.errors().clear(); | ||
} | ||
|
||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test doesn't have much meaning except ensured DiscoveryClient can be started up.
Nothing related to how services discovery with spring cloud integration and load balancing was tested.
We have to be sure we are able to forward requests to corresponding services from zuul with service center
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Written demo/IT code for:
- To test the discovery of particular micro-service
- To test the Zuul Proxy gateway feature to redirect the request to proper micro-service.
67523ca
to
2926655
Compare
@@ -0,0 +1,51 @@ | |||
package io.servicecomb.springboot.starter.serviceregistry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the license header here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
@@ -0,0 +1,28 @@ | |||
package io.servicecomb.springboot.starter.serviceregistry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
@Configuration | ||
@ConditionalOnProperty(value = "spring.cloud.service-registry.enabled", matchIfMissing = true) | ||
@AutoConfigureBefore(ServiceRegistryAutoConfiguration.class) | ||
public class CseServiceRegistryAutoConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should avoid using CSE any more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay once this PR is merged I will re-factor the names and raise another MR immediately, right now the PR code size is big, re-merging/re-basing is adding extra effort.
3428b76
to
687aef9
Compare
could you add this |
Added the "spring-boot-starter-discovery" and "demo-spring-boot-starter-discovery" in parent pom |
378d881
to
8da52eb
Compare
c36d47b
to
6707f17
Compare
6707f17
to
e5882b9
Compare
f7b3fa1
to
ce053f2
Compare
b8c79ca
to
bf85e2b
Compare
Auto Service Registration for spring-boot-starter-discovery