Eureka Discovery Server
Overview:
This article is a continuation of the Multi Module project. Here we are going to define about discovery server (Eureka).
build.gradle
group = 'com.apandiyan.discoveryserver'
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
application.yml
server:
port: 9000
eureka:
client:
register-with-eureka: false
fetch-registry: false
service-url:
defaultZone: http://localhost:9000/eureka
spring:
application:
name: discovery-server
DiscoveryServerApplication.java
@SpringBootApplication
@EnableEurekaServer //optional
public class DiscoveryServerApplication {
public static void main(String[] args) {
SpringApplication.run(DiscoveryServerApplication.class, args);
}
}