分享

SpringCloud创建eureka server和eureka client

 python_lover 2020-06-15

环境

  • idea 2019.1
  • Meavn 3.6.0
  • SpringBoot 2.2.5
  • jdk 1.8

构建eureka server

  • 新建工程
  • 启动类添加注解 @EnableEurekaServer
  • 其他配置

构建eureka client

  • 新建工程
  • pom文件添加依赖,解决启动失败
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
  • 启动类添加注解 @EnableDiscoveryClient
  • 其他配置

同时启动成功后



代码详见

菜鸟一枚,加油

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多