APPLICATION_ID:bmi service_description: # name of the declaring microservice name:gateway version:0.0.1 servicecomb: service: registry: address:http://127.0.0.1:30100
application.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
zuul: routes: calculator:/calculator/**
# disable netflix eurkea since it's not used for service discovery ribbon: eureka: enabled:false
server: port:8889
servicecomb: tracing: enabled:false
启动服务
在 IDEA 中运行刚才建的 bmi-gateway 项目。可以看到在 Run TAB 中的输出如下:
1 2 3 4 5 6 7 8 9 10 11 12
2019-10-25 11:11:17.321 INFO 7695 --- [ main] org.apache.servicecomb.core.SCBEngine : Service information is shown below: service center: [http://127.0.0.1:30100] config center: not exist AppID: bmi ServiceName: gateway Version: 0.0.1 Environment: production ServiceID: 296cb6b50987ec12967e934d1e3df522901b1ccc InstanceID; 1c2e1bf9f6d511e9ae530242ac110002
2019-10-25 11:11:17.323 INFO 7695 --- [ main] o.a.s.samples.bmi.GatewayApplication : Started GatewayApplication in 16.035 seconds (JVM running for 17.602) 2019-10-25 11:11:17.392 INFO 7695 --- [worker-thread-3] o.a.s.s.c.h.ServiceRegistryClientImpl : watching microservice 296cb6b50987ec12967e934d1e3df522901b1ccc successfully, the chosen service center address is 127.0.0.1:30100