Implements ConsulServiceRegistry and auto registration

No longer create ConsulLifecycle bean by default. It is now deprecated.

New auto registration is not created if user has created ConsulLifecycle
bean.
This commit is contained in:
Spencer Gibb
2016-11-14 13:49:00 -07:00
parent 29ae38d435
commit ba85624a98
51 changed files with 1892 additions and 373 deletions

View File

@@ -28,9 +28,9 @@ See the https://consul.io/intro/index.html[intro] for more information.
1. Run `docker-compose up`
2. Verify consul is running by visiting http://localhost:8500
3. Run `mvn package` this will bring in the required spring cloud maven repositories and build
4. Run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.1.3.BUILD-SNAPSHOT.jar`
4. Run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.2.0.BUILD-SNAPSHOT.jar`
5. visit http://localhost:8080, verify that `{"serviceId":"<yourhost>:8080","host":"<yourhost>","port":8080}` results
6. run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.1.3.BUILD-SNAPSHOT.jar --server.port=8081`
6. run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.2.0.BUILD-SNAPSHOT.jar --server.port=8081`
7. visit http://localhost:8080 again, verify that `{"serviceId":"<yourhost>:8081","host":"<yourhost>","port":8081}` eventually shows up in the results in a round robbin fashion (may take a minute or so).
== Building