本地部署Apollo+spring boot客户端连接

 

1.启动部署服务器

部署及启动参考 :https://github.com/ctripcorp/apollo/wiki/Quick-Start 二:安装步骤

./demo.sh start 等待一段时间

访问http://192.168.132.128:8070/ Apollo/admin

配置timeout参数为200

2.创建spring boot apollo客户端

新建一个spring boot项目

添加pom依赖

<dependency>

   <groupId>com.ctrip.framework.apollo</groupId>

   <artifactId>apollo-client</artifactId>

   c<version>1.3.0</version>

</dependency>

application.yml:

spring:
  application:
    name:
apolloDemo
app:
  id:
SampleApp
apollo:
  meta:
http://192.168.132.128:8080
 
bootstrap:
    enabled:
true
server:
  port:
9000

DemoApplication.java

 

3.测试

结果:

猜你喜欢

转载自blog.csdn.net/Tanganq/article/details/89742960
今日推荐