码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    在这里插入图片描述

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    Program arguments

    –configservice --adminservice
    
    • 1

    在这里插入图片描述

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    Program arguments

    –portal
    
    • 1

    在这里插入图片描述

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

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

    在这里插入图片描述

    有可能遇到数据库连接问题:
    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    在这里插入图片描述
    然后重启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

  • 相关阅读:
    【QT】qcombox的信号使用小细节,activated(int)和currentIndexChanged(int)
    初探Raft算法
    基于Vue和Spring Boot的在线点餐系统设计与实现
    传统关系型数据库(mysql),缓存(redis),elasticsearch
    案例+图解带你一文读懂Canvas【2W字,建议收藏】
    2022年认证杯SPSSPRO杯数学建模C题(第二阶段)污水流行病学原理在新冠疫情防控方面的作用求解全过程文档及程序
    Python:函数和代码复用
    ZYNQ自带I2S_IP核分析
    机器学习入门(七)神经网络--代价函数、前向反向传播算法及问题
    Python中怎样选择正确的可视化图表?
  • 原文地址:https://blog.csdn.net/g3230863/article/details/126038185
  • 最新文章
  • 沪漂五周年了:我越来越迷茫了
    Agentic Skill Routing 实战:别再把所有 Skill 塞进 AI Agent 上下文
    MySQL-Seconds_behind_master的精度误差
    [MAF预定义ChatClient中间件-03]CachingChatClient——利用缓存省钱省时间
    AI的至暗历史:从万众期待到被政府撤资,AI的两次死亡徘徊
    Agent OS :五种驯服不确定性的范式
    PortSwigger SQL注入LAB11
    数据库即时编译JIT
    [Begin]AI Learn Data Day 0
    深度学习进阶(二十七)现代 LLM 的核心架构设计其二:SwiGLU
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号