Setting Up Eureka Server Using Spring Cloud

This is a quick example for setting up Eureka server using Spring Cloud.

For this tutorial we will be creating a New Maven Project. To keep thing more simple we will be creating a simple maven project i.e. we will be skipping archetype selection.

New Maven Project Wizard – Creating a simple project

Just fill in the requisite Group Id and Artifact Id on next screen and we are good to go.

New Maven Project Wizard – Configuring project

You will need to create only two files ‘’ and ‘’ for this project. Your may refer to following directory structure for their respective locations.

Project Structure

Replace content in pom.xml file with following content

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""


	<description>Demo project for Spring Boot</description>

		<relativePath/> <!-- lookup parent from repository -->






			<name>Spring Milestones</name>


Under resources folder create a file with name ‘’ and add following content

Create file ‘’ and add following content

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

public class AsmEurekaApplication {

	public static void main(String[] args) {, args);

That’s all. The magic annotation @EnableEurekaServer will do rest everything for you.

Now just run as Java application and Eureka server should start on port 11800. You can open eureka server dashboard by navigating to http://localhost:11800 from your browser.

Eureka Server Dashboard

You can download the whole project by using following link.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.