SpringCloud创建eureka server和eureka client
环境
- 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
![]()
- 其他配置
![]()
同时启动成功后

代码详见
- https://github.com/zhaimiya/cloudlearn 中的client
- https://github.com/zhaimiya/cloudlearn 中的eureka
菜鸟一枚,加油
❀❀ (ง •_•)ง little little 🦆🦆 ❀❀❀❀ ♕♕♕♕♕







浙公网安备 33010602011771号