diff --git a/pom.xml b/pom.xml
index 3257dfe7..fa61747b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,6 +22,7 @@
UTF-8
UTF-8
1.8
+ Edgware.SR5
@@ -138,6 +139,12 @@
runtime
+
+ org.springframework.cloud
+ spring-cloud-starter-eureka
+
+
+
@@ -184,4 +191,15 @@
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring-cloud.version}
+ pom
+ import
+
+
+
diff --git a/src/main/java/com/gzzn/omms/msgexchangeapi/MsgexchangeApiApplication.java b/src/main/java/com/gzzn/omms/msgexchangeapi/MsgexchangeApiApplication.java
index 6f1525ef..8eeef2ee 100644
--- a/src/main/java/com/gzzn/omms/msgexchangeapi/MsgexchangeApiApplication.java
+++ b/src/main/java/com/gzzn/omms/msgexchangeapi/MsgexchangeApiApplication.java
@@ -2,10 +2,12 @@ package com.gzzn.omms.msgexchangeapi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableScheduling
+@EnableEurekaClient
public class MsgexchangeApiApplication {
public static void main(String[] args) {
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 2e0641bd..9dd9ef63 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -84,4 +84,10 @@ elasticsearch:
pool: 5
#注意cluster.name需要与config/elasticsearch.yml中的cluster.name一致
cluster:
- name: docker-cluster
\ No newline at end of file
+ name: docker-cluster
+eureka:
+ client:
+ service-url:
+ defaultZone: http://130.120.3.231:94/eureka/
+ instance:
+ prefer-ip-address: true
\ No newline at end of file
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 6fbec020..4341afb3 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,3 +1,5 @@
spring:
+ application:
+ name: msgexchangeapi
profiles:
active: dev
\ No newline at end of file