多实例集群

server:
  port: 8089
  servlet:
    context-path: /
spring.application.name=miaosha-order
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
# spring.cloud.nacos.config.namespace=08dbdfd1-d79d-4c63-9787-bf6045822283
# spring.cloud.nacos.config.group=HUODONG1_GROUP

spring.cloud.nacos.config.extension-configs[0].data-id=server2.yml
spring.cloud.nacos.config.extension-configs[0].group=miaosha-order
spring.cloud.nacos.config.extension-configs[0].refresh=true

spring.cloud.nacos.config.extension-configs[1].data-id=sys.yml
spring.cloud.nacos.config.extension-configs[1].group=miaosha-order
spring.cloud.nacos.config.extension-configs[1].refresh=true

spring.cloud.nacos.config.extension-configs[2].data-id=redis.yml
spring.cloud.nacos.config.extension-configs[2].group=miaosha-base
spring.cloud.nacos.config.extension-configs[2].refresh=true

spring.cloud.nacos.config.extension-configs[3].data-id=mysql.yml
spring.cloud.nacos.config.extension-configs[3].group=miaosha-base
spring.cloud.nacos.config.extension-configs[3].refresh=true

spring.cloud.nacos.config.extension-configs[4].data-id=rabbitmq.yml
spring.cloud.nacos.config.extension-configs[4].group=miaosha-base
spring.cloud.nacos.config.extension-configs[4].refresh=true

spring.cloud.nacos.config.extension-configs[5].data-id=mybatis-plus.yml
spring.cloud.nacos.config.extension-configs[5].group=miaosha-base
spring.cloud.nacos.config.extension-configs[5].refresh=true
   /**
     * 查询秒杀结果
     * @param userId
     * @param miaoShaGoodsId
     * @return
     */
    @RequestMapping("/getMiaoShaResult")
    public String getMiaoShaResult(@RequestParam("userId") Integer userId,@RequestParam("miaoShaGoodsId") Integer miaoShaGoodsId){
        System.out.println("order2");
        return orderService.getMiaoShaResult(userId,miaoShaGoodsId);
    }

你可能感兴趣的:(rabbitmq,分布式)