From 177a16b9013055b587de31e7c92ee4a02316ebf9 Mon Sep 17 00:00:00 2001 From: Julian Horner <julianhorner@web.de> Date: Mon, 16 Dec 2019 18:43:27 +0100 Subject: [PATCH] Add configuration for eureka server --- pom.xml | 63 ++++++++++++++++++++++++++++++ src/main/resources/application.yml | 16 ++++++++ 2 files changed, 79 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/resources/application.yml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..229d368 --- /dev/null +++ b/pom.xml @@ -0,0 +1,63 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.rtuni.ms.euka</groupId> + <artifactId>eureka-server</artifactId> + <version>1.0.0</version> + <packaging>war</packaging> + + <name>eureka-server</name> + <description>Eureka server to register services</description> + + <properties> + <java.version>1.8</java.version> + </properties> + + <parent> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-parent</artifactId> + <version>2.0.0.RELEASE</version> + </parent> + + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-devtools</artifactId> + <optional>true</optional> + </dependency> + </dependencies> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-dependencies</artifactId> + <version>Finchley.RELEASE</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <mainClass>de.rtuni.ms.euka.Application</mainClass> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..6c5c94c --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,16 @@ +# Give a name to the eureka server +spring: + application: + name: eureka-server + +# HTTP Server (Tomcat) port +server: + port: 8761 # default port for eureka server + +# Configure this Discovery Server +eureka: + client: # Not a client, don't register with yourself + registerWithEureka: false + fetchRegistry: false + serviceUrl: + defaultZone: http://localhost:8761/eureka/ -- GitLab