组织介绍

Project

cloud_config_demo

file for spring cloud org.example.client demo

springcloud-config

cloud_config_service : spring cloud server
cloud_config_client : spring cloud client
cloud_config_client_1 : another spring cloud client
cloud_config_bus : spring cloud bus(server) with rabbitmq

Test url

get config info from config server

/{application}/{profile}[/{label}]
/{application}-{profile}.yml
/{application}-{profile}.properties
/{label}/{application}-{profile}.yml
/{label}/{application}-{profile}.properties

eg:

http://localhost:19090/master/cloud-config-dev.yml
http://localhost:19090/cloud-config/dev
http://localhost:19090/cloud-config-dev.yml
http://localhost:19090/cloud-config/dev/master

fresh all form bus(rabbitmq)

http://localhost:19090/actuator/busrefresh
http://localhost:19090/actuator/busrefresh//cloud_config_client_1:19092

or push msg from rabbitmq:

    {"type":"RefreshRemoteApplicationEvent","timestamp":1661824031722,"originService":"cloud_config_bus:19090:${cachedrandom.${vcap.application.name:${spring.application.name:application}}.value}","destinationService":"**","id":"831f1aff-3464-45b9-9dab-eae2ffe6e222c"}

    {"type":"RefreshRemoteApplicationEvent","timestamp":1661825514490,"originService":"cloud_config_bus:19090:${cachedrandom.${vcap.application.name:${spring.application.name:application}}.value}","destinationService":"cloud_config_client_1:19092:**","id":"7dbbf8e8-7324-4c67-a099-7a335d347b26"}

    {"type":"RefreshRemoteApplicationEvent","timestamp":1661825514490,"originService":"cloud_config_bus:19090:${cachedrandom.${vcap.application.name:${spring.application.name:application}}.value}","destinationService":"cloud_**_1:**:**","id":"7dbbf8e8-7324-4c67-a099-7a335d347b26"}

fresh only one from config client

http://localhost:19091/actuator/refresh
http://localhost:19092/actuator/refresh

test url with get config

http://localhost:19091/getConfigInfo
http://localhost:19092/getConfigInfo

RabbitMQ in docker

docker rum rabbitmq

docker pull rabbitmq:3.8-management
docker run --name rabbitmq -d -p 15672:15672 -p 5672:5672 rabbitmq:3.8-management
docker logs -f rabbitmq

open default port

firewall-cmd --zone=public --add-port=5672/tcp --permanent
firewall-cmd --zone=public --add-port=15672/tcp --permanent

open rabbit ui

http://192.168.153.210:15672/
account/pwd:guest
成就
0
Star
0
Fork
成员(1)
8749142 dopa cao 1667136815
diem

搜索帮助