微服务demo的maven配置。

https://github.com/Mounanan/springcloud_test

 

maven版本使用的3.6.1,settings.xml的<profiles>标签配置如下
  <profile>
       <id>nexus</id> 
        <repositories>
            <repository>
                <id>nexus</id>
                <name>local private nexus</name>
                <url>http://maven.oschina.net/content/groups/public/</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </repository>
        </repositories>
        
        <pluginRepositories>
            <pluginRepository>
            <id>nexus</id>
            <name>local private nexus</name>
            <url>http://maven.oschina.net/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile>
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
demo参考网上资料,使用mvn建项,使用者需要有一定mvn基础。 demo没有实现复杂业务,只实现了部分功能: 微服务模块初始化时,常量和数据库信息等使用云配置服务(spring config)获取; 微服务之间使用负载均衡(ribbon); 微服务网关路由配置微服务断路器(hystrix)及监听服务等 启动步骤: 1.启动server-eureka,端口6600,微服务注册中心 访问http://localhost:6600,查看效果 2.启动server-config,端口6700,统一配置服务中心 访问http://localhost:6700/service-order/online,查看效果 3.启动service-order,端口6002,初始化使用配置服务server-config动态加载数据库 访问http://localhost:6002/order,查看效果 4.启动service-user,端口6001,使用注册后的服务名service-order进行服务之间调用,避免传统维护困难的ip:port方式 模块中使用了ribbon负载均衡请求service-order,需要启动至少两个service-order服务 访问http://localhost:6001/user/order,查看效果 5.启动gateway-zuul,端口6000,用于url路由配置,服务统一端口入口 http://localhost:6000/service-order/order等效于访问http://localhost:6002/order http://localhost:6000/service-user/user/order等效于访问http://localhost:6001/user/order 6.启动hystrix-dashboard,端口6500,可选,WEB界面查看监听服务,如服务成功多少,失败多少等信息 进入hystrix-dashboard界面后,填入监控地址:http://localhost:6001/hystrix.stream
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值