From 33c63274d5be44b7de144137d9db3b4ba84b34ff Mon Sep 17 00:00:00 2001
From: zhouxiunai <154707516@qq.com>
Date: Mon, 14 Jan 2019 10:58:19 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=8D=E5=8A=A1=E5=8F=91?=
=?UTF-8?q?=E7=8E=B0=E6=B3=A8=E5=86=8C=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 18 ++++++++++++++++++
.../MsgexchangeApiApplication.java | 2 ++
src/main/resources/application-dev.yml | 8 +++++++-
src/main/resources/application.yml | 2 ++
4 files changed, 29 insertions(+), 1 deletion(-)
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