栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

apollo源码启动服务,apollo源码分析

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

apollo源码启动服务,apollo源码分析

文章目录
    • 1.下载APOLLO源码
    • 2.执行Sql脚本
    • 3.启动项目
      • 3.1 启动ConfigServiceApplication
      • 3.2 启动apollo-assembly
      • 3.3 启动 apollo-portal
    • 4.打开apollo控制台
    • 5.源码分析

1.下载APOLLO源码

https://gitee.com/nobodyiam/apollo

2.执行Sql脚本

3.启动项目

编译项目后

3.1 启动ConfigServiceApplication
-Denv=dev
-Dspring.profiles.active=github
-Deureka.service.url=http://localhost:8080/eureka/
-Dspring.datasource.url=jdbc:mysql://localhost:3306/apolloconfigdb?characterEncoding=utf8&serverTimezone=Asia/Shanghai
-Dspring.datasource.username=root
-Dspring.datasource.password=123456
-Dlogging.file=D:/logs/apollo-assembly.log

3.2 启动apollo-assembly

VM

-Denv=dev
-Dspring.profiles.active=github
-Deureka.service.url=http://localhost:8080/eureka/
-Dspring.datasource.url=jdbc:mysql://localhost:3306/apolloconfigdb?characterEncoding=utf8&serverTimezone=Asia/Shanghai
-Dspring.datasource.username=root
-Dspring.datasource.password=123456
-Dlogging.file=D:/logs/apollo-assembly.log

Program arguments

–configservice --adminservice

3.3 启动 apollo-portal

VM

-Denv=dev
-Ddev_meta=http://localhost:8080
-Dhibernate.query.plan_cache_max_size=192
-Dspring.datasource.url=jdbc:mysql://localhost:3306/apolloportaldb?characterEncoding=utf8&serverTimezone=Asia/Shanghai
-Dspring.datasource.username=root
-Dspring.datasource.password=123456
-Dlogging.file=D:/logsh/apollo-portal.log

Program arguments

–portal

增加apollo-portal 下的application.yml中增加配置

spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect

有可能遇到数据库连接问题:
Data source rejected establishment of connection, message from server: “Too many connections”

修改mysql下的my.ini文件

# 允许最大连接数
max_connections=1000
# max_user_connections设置每用户最大连接数为500
max_user_connections=500
# wait_timeout表示200秒后将关闭空闲(IDLE)的连接,但是对正在工作的连接不影响。
wait_timeout=200


然后重启mysql服务 net stop mysql,net start mysql

4.打开apollo控制台

http://localhost:8070
用户名:apollo
密码:admin

5.源码分析

这边简单易懂
https://cloud.tencent.com/developer/article/1964636

参考:
https://gitee.com/nobodyiam/apollo/wikis/Quick-Start
https://blog.csdn.net/yang1076180972/article/details/121058159?ops_request_misc=&request_id=&biz_id=102&utm_term=apollo%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%BF%83%E6%BA%90%E7%A0%81%E5%90%AF%E5%8A%A8&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-0-121058159.142v35pc_rank_34&spm=1018.2226.3001.4187

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1031254.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号