server:
port: 8080
eureka:
instance:
hostname: eureka8080.com #eureka服务端的实例名称
client:
register-with-eureka: false #false表示不向注册中心注册自己。
fetch-registry: false #false表示自己端就是注册中心,我的职责就是维护服务实例,并不需要去检索服务
service-url:
#集群指向其它eureka
#defaultZone: http://eureka8081.com:8081/eureka/
#单机就是8080自己
defaultZone: http://eureka8080.com:8080/eureka/
#server:
#关闭自我保护机制,保证不可用服务被及时踢除
#enable-self-preservation: false
#eviction-interval-timer-in-ms: 2000
@SpringBootApplication
@EnableEurekaServer//eureka配置
public class EurekaMain8080
{
public static void main(String[] args) {
SpringApplication.run(EurekaMain8080.class, args);
}
}