Skip to content

Commit ca1538f

Browse files
committed
creating the Eureka discover server at port 8761
1 parent 367c117 commit ca1538f

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

discovery-server/pom.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>com.csaba79coder</groupId>
8+
<artifactId>best-protocol</artifactId>
9+
<version>3.0.2</version>
10+
</parent>
11+
12+
<artifactId>discovery-server</artifactId>
13+
14+
<properties>
15+
<java.version>17</java.version>
16+
<maven.compiler.source>17</maven.compiler.source>
17+
<maven.compiler.target>17</maven.compiler.target>
18+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
20+
<version>${project.version}</version>
21+
</properties>
22+
23+
<dependencies>
24+
<dependency>
25+
<groupId>org.springframework.cloud</groupId>
26+
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-autoconfigure</artifactId>
31+
</dependency>
32+
</dependencies>
33+
34+
</project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.csaba79coder.discoveryserver;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
6+
7+
@SpringBootApplication
8+
@EnableEurekaServer
9+
public class DiscoveryServerApplication {
10+
11+
public static void main(String[] args) {
12+
SpringApplication.run(DiscoveryServerApplication.class, args);
13+
}
14+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
eureka.instance.hostname=localhost
2+
eureka.client.register-with-eureka=false
3+
eureka.client.fetch-registry=false
4+
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka
5+
server.port=8761
6+
7+
spring.application.name=discovery-server

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<modules>
1919
<module>api-contract</module>
2020
<module>government-service</module>
21+
<module>discovery-server</module>
2122
</modules>
2223

2324
<properties>
@@ -27,6 +28,7 @@
2728
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2829
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2930
<project.version>2.3.0-SNAPSHOT</project.version>
31+
<spring-cloud.version>2022.0.2</spring-cloud.version>
3032
</properties>
3133

3234
<dependencyManagement>
@@ -36,6 +38,13 @@
3638
<artifactId>best-protocol</artifactId>
3739
<version>3.0.2</version>
3840
</dependency>
41+
<dependency>
42+
<groupId>org.springframework.cloud</groupId>
43+
<artifactId>spring-cloud-dependencies</artifactId>
44+
<version>${spring-cloud.version}</version>
45+
<type>pom</type>
46+
<scope>import</scope>
47+
</dependency>
3948
</dependencies>
4049
</dependencyManagement>
4150

0 commit comments

Comments
 (0)