See the following configuration:
apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' group = 'com.dineshonjava' version = '0.0.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenCentral() maven { url "https://repo.spring.io/snapshot" } maven { url "https://repo.spring.io/milestone" } } ext { springCloudVersion = 'Finchley.M7' } dependencies { compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-server') testCompile('org.springframework.boot:spring-boot-starter-test') } dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" } }
As you can see, with the pom.xml Maven configuration file and the build.gradle Gradle configuration file, you have added the Starter with the org.springframework.cloud group and spring-cloud-starter-netflix-eureka-server artifact ID. This starter provides the auto-configuration about Netflix's Eureka server to a service registry.
But, by default, the Eureka server doesn't enable. So you have to enable the Eureka server by using the @EnableEurekaServer annotation in a main Spring Boot application class that is also annotated with the @SpringBootApplication annotation.