You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

build.gradle
dependencies {
    compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-server')
}
application.yml
server:
  port: 8761  # Default : 8761

spring:
  application:
    name: eureka-server

eureka:
  server:
    response-cache-update-interval-ms: 1000 # Eureka Server's Response Cache. Default 30,000ms
    enableSelfPreservation: false           # Just for demo
  client:
    register-with-eureka: false             # Only for local stand-alone development
    fetch-registry: false                   # Only for local stand-alone development
    service-url:
      defaultZone: http://localhost:8761/eureka  # Default Value. Just for demo
  instance:
    prefer-ip-address: true                 # Use ip address instead of hostname from OS when reporting myself to eureka server
EurekaServiceApplication
@EnableEurekaServer 
@SpringBootApplication 
public class EurekaServiceApplication { 
 public static void main(String[] args) { 
 SpringApplication.run(EurekaServiceApplication.class); 
 } 
}



  • No labels