SpringCloud搭建微服务架构
SpringBoot 版本1.5.6.RELEASE Dalston.SR3
与时俱进,一起学习进步。
经过几天学习实践整理,已经完成SpringCloud 注册中心 、SpringCloud Config配置中心 搭建。
安装的三台Linux虚拟机:
JDK环境1.8
master :192.168.0.132
打包运行注册中心
nohup java -jar eureka-server-0.0.1-SNAPSHOT.jar --spring.profiles.active=peer1 >eureka-server-peer1.log &
yum安装了SVN用于配置中心 svnadmin create /data/svn
提交测试文件:
application.properties 用于全局配置
cloud-config-demo.properties
cloud-config-dev.properties
slave1:192.168.0.114
nohup java -jar eureka-server-0.0.1-SNAPSHOT.jar --spring.profiles.active=peer1 >eureka-server-peer1.log &
slave2:192.168.0.103
nohup java -jar eureka-server-0.0.1-SNAPSHOT.jar --spring.profiles.active=peer1 >eureka-server-peer1.log &
本机启用配置中心及调用客户端,测试能动态调用SVN中的配置文件:
测试是否正常调用
http://localhost:8081/config/demo
http://localhost:8081/cloud-config-dev.properties
http://localhost:8082/from 请求自定义的from 方法,代码中有写
三个注册中心,正常访问:
接下来学习:
消息队列rabbitmq
实现接口多版本控制的项目 fm-cloud-graybunny
持续集成(CI)- 解放双手 Jenkins
感兴趣的童鞋可以下载。
下载地址:https://download.csdn.net/download/thl331860203/10647867