From 7fd4cf4443e6b761a5c23982d02322e2144d6121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E4=B8=8B=E8=97=A4=E5=90=89=E9=83=8E?= <827908815@qq.com> Date: Wed, 5 May 2021 20:53:55 +0800 Subject: [PATCH] 123 --- build.gradle | 2 -- src/main/resources/application.properties | 18 ------------------ src/main/resources/application.yml | 22 ++++++++++++++++++++++ 3 files changed, 22 insertions(+), 20 deletions(-) delete mode 100644 src/main/resources/application.properties create mode 100644 src/main/resources/application.yml diff --git a/build.gradle b/build.gradle index 444b6f6..a5055f9 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,6 @@ plugins { group = 'com.zkcloud' version = '1.0.0' -sourceCompatibility = '1.8' repositories { maven { url 'https://maven.aliyun.com/nexus/content/groups/public' } @@ -27,7 +26,6 @@ ext { dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server' - implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'com.github.ben-manes.caffeine:caffeine:2.8.8' } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 80445d2..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1,18 +0,0 @@ -# \u670D\u52A1\u7AEF\u53E3 -server.port=8000 -# \u670D\u52A1\u540D -spring.application.name=eureka-server -# \u670D\u52A1\u5B9E\u529BID Eureka\u7BA1\u7406\u9875\u9762\u5C55\u793A -eureka.instance.instance-id=${spring.application.name}:${server.port} -# \u670D\u52A1\u6240\u5728\u4E3B\u673A -eureka.instance.hostname=localhost -# \u662F\u5426\u5C06\u81EA\u8EAB\u6CE8\u518C\u5230Eureka -eureka.client.register-with-eureka=false -# \u662F\u5426\u5237\u65B0\u670D\u52A1\u5B9E\u4F8B\u5217\u8868 -eureka.client.fetch-registry=false -# \u5F00\u542F\u81EA\u6211\u4FDD\u62A4 -eureka.server.enable-self-preservation=false -# Actuator\u5F00\u653E\u6240\u6709\u7AEF\u70B9 -management.endpoints.web.exposure.include=* -# \u5168\u5C40\u65E5\u5FD7\u7EA7\u522B -logging.level.root=info diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..ec9e63e --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,22 @@ +server: + port: 8000 +spring: + application: + name: eureka-server +eureka: + server: + enable-self-preservation: false + instance: + hostname: localhost + instance-id: ${spring.application.name}:${server.port} + client: + fetch-registry: false + register-with-eureka: false +management: + endpoints: + web: + exposure: + include: '*' +logging: + level: + root: info \ No newline at end of file -- GitLab