Apollo(三)-调试环境搭建

前提

本地Win10上已安装Jdk1.8、Mysql、Navicat、Idea;

源码

下载

apollo-master.zip
在这里插入图片描述

解压

D:\YDSource\apollo-master
在这里插入图片描述

Idea导入项目(Maven工程)

在这里插入图片描述
在这里插入图片描述

Navicat导入数据库

数据库用户名和密码:root/123456
在这里插入图片描述

配置

新建三个Application启动项
在这里插入图片描述

ApolloApplication

在这里插入图片描述
在这里插入图片描述

-Dapollo_profile=github
-Dspring.datasource.url=jdbc:mysql://localhost:3306/apolloconfigdb?characterEncoding=utf8
-Dspring.datasource.username=root
-Dspring.datasource.password=123456
-Dlogging.file=D://apollo-assembly.log
--configservice --adminservice

PortalApplication

在这里插入图片描述

-Dapollo_profile=github,auth
-Ddev_meta=http://localhost:8080/
-Dserver.port=8070
-Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8
-Dspring.datasource.username=root
-Dspring.datasource.password=123456
-Dlogging.file=D://apollo-portal.log

SimpleApolloConfigDemo

在这里插入图片描述

-Denv=dev
-Ddev_meta=http://localhost:8080

运行

启动AplloApplication

在这里插入图片描述
访问eureka地址:http://localhost:8080/
可以看到adminservice、configservice都启动了:
在这里插入图片描述

启动PortalApplication

在这里插入图片描述
访问http://localhost:8070,结果如下
在这里插入图片描述

启动SimpleApolloConfigDemo

在这里插入图片描述
输入name后显示没有该值,如下所示:
在这里插入图片描述

修改变量值

在apollo中建立id为100004458的项目:
在这里插入图片描述
新增name的配置,并发布
在这里插入图片描述
发布的配置成功了
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值