一个spring-cloud启动服务中心,提供服务注册和服务发现的例子
- 启动注册中心,
gradle :eureka-server:bootRun
, - 启动服务提供者,
gradle :provider:bootRun
- 启动服务消费者,
gradle :consumer:bootRun
- 启动服务消费者,
gradle :consumer-feign:bootRun
可以通过 http://localhost:8761/
访问注册中心
可以通过 http://localhost:8002/hello
测试
可以通过 http://localhost:8003/hello/tian
测试