springCloud入门级例子下载

AI100_小助手 2018-03-06 01:14:17
## 模块介绍
- eurekaserve 服务注册模块
- api-gateway 路由模块
- server-bi 业务service
- servcie-system 系统service
- hystrixdashboard hystrix监控service 无需注册

# 注册中心
- [原版官网](https://cloud.spring.io/spring-cloud-static/Finchley.M6/single/spring-cloud.html)
- [中文版](https://springcloud.cc/spring-cloud-dalston.html)

## 简单配置方法(12.4 Standalone Mode)

```
spring:
application:
name: spring-cloud-eureka
server:
port: 1111
eureka:
instance:
hostname: localhost
client:
registerWithEureka: false
fetchRegistry: false
serviceUrl:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
```
## 高可用集群配置(12.5 Peer Awareness)

```
#改成3个-
spring:
application:
name: spring-cloud-eureka
profiles: peer1
server:
port: 8000
eureka:
instance:
# 必须使用自身的hostname
hostname: peer1
client:
serviceUrl:
# 这里的url需要使用需要高可用的hostname和port
defaultZone: http://peer2:8001/eureka/

#改成3个-
spring:
application:
name: spring-cloud-eureka
profiles: peer2
server:
port: 8001
eureka:
instance:
#必须使用自身的hostname
hostname: peer2
client:
serviceUrl:
# 这里的url需要使用需要高可用的hostname和port
defaultZone: http://peer1:8000/eureka/

```
相关下载链接://download.csdn.net/download/zwfmu/10271264?utm_source=bbsseo
...全文
23 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

12,795

社区成员

发帖
与我相关
我的任务
社区描述
CSDN 下载资源悬赏专区
其他 技术论坛(原bbs)
社区管理员
  • 下载资源悬赏专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧