Spring Cloud Eureka 简单创建
1.pom.xml 添加相关依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
2. .yml文件 添加相关配置
server:
port: 8761
eureka:
client:
register-with-eureka: false
fetch-registry: false
service-url:
defaultZon:
http://localhost:8761/euraka/
3. 启动类添加相关的注解
@EnableAutoConfiguration
@EnableEurekaServer