共计 530 个字符,预计需要花费 2 分钟才能阅读完成。
一、启动项配置 @EnableEurekaServer
@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {public static void main(String[] args) {SpringApplication.run(EurekaApplication.class, args);
}
}
二、Maven 依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
三、Eureka 配置
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka/
register-with-eureka: false
server:
enable-self-preservation: false
spring:
application:
name: eureka
server:
port: 8761
三、Eureka 注册中心界面
正文完