SpringCloud 集成 Eureka Server
- 1 pom.xml
- 2 application.yml
- 3 appliction.java
- 4 启动
Eureka的优点:
简单易用:Eureka设计简单,容易上手和部署。
高可用性:Eureka支持高可用性配置,通过使用多个Eureka服务器实例来提供容错和故障恢复能力。
快速注册和发现:Eureka使用心跳机制来快速注册和发现服务,可以实时感知服务实例的变化。
社区支持:Eureka作为Netflix开源项目的一部分,有一个活跃的开发社区,提供技术支持和持续改进。
Eureka的缺点:
缺乏健壮性:在某些复杂网络环境下,Eureka的心跳机制可能导致一些问题,如延迟或数据不一致性。
功能有限:相对于其他服务注册中心,Eureka的功能相对较少,它主要专注于服务的注册和发现,缺乏一些高级功能。
Nacos的优点:
功能丰富:Nacos提供了广泛的功能,包括服务注册和发现、配置管理、动态路由等,可以满足更复杂的分布式系统需求。
可扩展性:Nacos支持集群部署和水平扩展,可以应对大规模系统和高并发流量。
健康检查:Nacos提供了健康检查机制,能够监测和移除不可用的服务实例,提高系统的可用性。
支持多种语言:Nacos支持多种编程语言和开发框架,适用于各种技术栈和开发团队。
Nacos的缺点:
复杂性:由于功能丰富,Nacos相对于Eureka而言更复杂一些,对于初学者来说上手和配置可能需要一些时间和学习成本。
较大的资源消耗:Nacos需要更多的系统资源来运行,特别是在大规模部署和高并发环境下,可能需要更多的计算和存储资源。
1 pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.xu</groupId>
<artifactId>eureka-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>eureka</name>
<description>Eureka Server</description>
<properties>
<java.version>17</java.version>
<spring-cloud.version>2022.0.2</spring-cloud.version>
</properties>
<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>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>3.1.6</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>netflix-candidates</id>
<name>Netflix Candidates</name>
<url>https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
2 application.yml
# 服务端口
server:
port: 9000
# 服务名字
spring:
application:
name: eureka-server
# Eureka 配置
eureka:
dashboard:
enabled: true
instance:
# 防止 The replica size seems to be empty. Check the route 53 DNS Registry 提示
prefer-ip-address: true
hostname: 127.0.0.1
client:
# false 表示不向注册中心注册自己。
register-with-eureka: false
# false 表示自己端就是维护服务实例的注册中心,不需要去检索服务。
fetch-registry: false
service-url:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
server:
# 自我保护机制
enable-self-preservation: false
# 自我保护系数(默认0.85)
renewal-percent-threshold: 0.85
# 扫描失效服务时间间隔(单位毫秒,默认60*1000)60秒
eviction-interval-timer-in-ms: 30000
# 设置eureka server同步失败的等待时间,默认5分钟,在这期间它不向客户端提供服务注册信息
wait-time-in-ms-when-sync-empty: 5
# 设置eureka server同步失败的重试次数,默认为5次
number-of-replication-retries: 5
3 appliction.java
package com.xu.eureka;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
/**
* @author hyacinth
*/
@EnableEurekaServer
@SpringBootApplication
public class EurekaApplication {
public static void main(String[] args) {
SpringApplication.run(EurekaApplication.class, args);
}
}
4 启动
D:\Environment\Java\jdk-17.0.7\bin\java.exe "-javaagent:D:\IDE\IntelliJ IDEA Community Edition 2023.1.1\lib\idea_rt.jar=9491:D:\IDE\IntelliJ IDEA Community Edition 2023.1.1\bin" -Dfile.encoding=UTF-8 -classpath E:\SoureCode\Learn\eureka-server\target\classes;E:\Maven\Repository\org\springframework\boot\spring-boot-starter-web\3.0.6\spring-boot-starter-web-3.0.6.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-starter\3.0.6\spring-boot-starter-3.0.6.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-starter-logging\3.0.6\spring-boot-starter-logging-3.0.6.jar;E:\Maven\Repository\ch\qos\logback\logback-classic\1.4.7\logback-classic-1.4.7.jar;E:\Maven\Repository\ch\qos\logback\logback-core\1.4.7\logback-core-1.4.7.jar;E:\Maven\Repository\org\apache\logging\log4j\log4j-to-slf4j\2.19.0\log4j-to-slf4j-2.19.0.jar;E:\Maven\Repository\org\apache\logging\log4j\log4j-api\2.19.0\log4j-api-2.19.0.jar;E:\Maven\Repository\org\slf4j\jul-to-slf4j\2.0.7\jul-to-slf4j-2.0.7.jar;E:\Maven\Repository\jakarta\annotation\jakarta.annotation-api\2.1.1\jakarta.annotation-api-2.1.1.jar;E:\Maven\Repository\org\yaml\snakeyaml\1.33\snakeyaml-1.33.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-starter-json\3.0.6\spring-boot-starter-json-3.0.6.jar;E:\Maven\Repository\com\fasterxml\jackson\core\jackson-databind\2.14.2\jackson-databind-2.14.2.jar;E:\Maven\Repository\com\fasterxml\jackson\core\jackson-annotations\2.14.2\jackson-annotations-2.14.2.jar;E:\Maven\Repository\com\fasterxml\jackson\core\jackson-core\2.14.2\jackson-core-2.14.2.jar;E:\Maven\Repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.14.2\jackson-datatype-jdk8-2.14.2.jar;E:\Maven\Repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.14.2\jackson-datatype-jsr310-2.14.2.jar;E:\Maven\Repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.14.2\jackson-module-parameter-names-2.14.2.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-starter-tomcat\3.0.6\spring-boot-starter-tomcat-3.0.6.jar;E:\Maven\Repository\org\apache\tomcat\embed\tomcat-embed-core\10.1.8\tomcat-embed-core-10.1.8.jar;E:\Maven\Repository\org\apache\tomcat\embed\tomcat-embed-el\10.1.8\tomcat-embed-el-10.1.8.jar;E:\Maven\Repository\org\apache\tomcat\embed\tomcat-embed-websocket\10.1.8\tomcat-embed-websocket-10.1.8.jar;E:\Maven\Repository\org\springframework\spring-web\6.0.8\spring-web-6.0.8.jar;E:\Maven\Repository\org\springframework\spring-beans\6.0.8\spring-beans-6.0.8.jar;E:\Maven\Repository\io\micrometer\micrometer-observation\1.10.6\micrometer-observation-1.10.6.jar;E:\Maven\Repository\io\micrometer\micrometer-commons\1.10.6\micrometer-commons-1.10.6.jar;E:\Maven\Repository\org\springframework\spring-webmvc\6.0.8\spring-webmvc-6.0.8.jar;E:\Maven\Repository\org\springframework\spring-aop\6.0.8\spring-aop-6.0.8.jar;E:\Maven\Repository\org\springframework\spring-context\6.0.8\spring-context-6.0.8.jar;E:\Maven\Repository\org\springframework\spring-expression\6.0.8\spring-expression-6.0.8.jar;E:\Maven\Repository\org\springframework\cloud\spring-cloud-starter-netflix-eureka-server\4.0.1\spring-cloud-starter-netflix-eureka-server-4.0.1.jar;E:\Maven\Repository\org\springframework\cloud\spring-cloud-starter\4.0.2\spring-cloud-starter-4.0.2.jar;E:\Maven\Repository\org\springframework\cloud\spring-cloud-context\4.0.2\spring-cloud-context-4.0.2.jar;E:\Maven\Repository\org\springframework\security\spring-security-crypto\6.0.3\spring-security-crypto-6.0.3.jar;E:\Maven\Repository\org\springframework\cloud\spring-cloud-commons\4.0.2\spring-cloud-commons-4.0.2.jar;E:\Maven\Repository\org\springframework\security\spring-security-rsa\1.0.11.RELEASE\spring-security-rsa-1.0.11.RELEASE.jar;E:\Maven\Repository\org\bouncycastle\bcpkix-jdk15on\1.69\bcpkix-jdk15on-1.69.jar;E:\Maven\Repository\org\bouncycastle\bcprov-jdk15on\1.69\bcprov-jdk15on-1.69.jar;E:\Maven\Repository\org\bouncycastle\bcutil-jdk15on\1.69\bcutil-jdk15on-1.69.jar;E:\Maven\Repository\org\springframework\cloud\spring-cloud-netflix-eureka-server\4.0.1\spring-cloud-netflix-eureka-server-4.0.1.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-starter-actuator\3.0.6\spring-boot-starter-actuator-3.0.6.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-actuator-autoconfigure\3.0.6\spring-boot-actuator-autoconfigure-3.0.6.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-actuator\3.0.6\spring-boot-actuator-3.0.6.jar;E:\Maven\Repository\io\micrometer\micrometer-core\1.10.6\micrometer-core-1.10.6.jar;E:\Maven\Repository\org\hdrhistogram\HdrHistogram\2.1.12\HdrHistogram-2.1.12.jar;E:\Maven\Repository\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-starter-freemarker\3.0.6\spring-boot-starter-freemarker-3.0.6.jar;E:\Maven\Repository\org\freemarker\freemarker\2.3.32\freemarker-2.3.32.jar;E:\Maven\Repository\org\springframework\spring-context-support\6.0.8\spring-context-support-6.0.8.jar;E:\Maven\Repository\org\springframework\cloud\spring-cloud-netflix-eureka-client\4.0.1\spring-cloud-netflix-eureka-client-4.0.1.jar;E:\Maven\Repository\com\netflix\eureka\eureka-client\2.0.0\eureka-client-2.0.0.jar;E:\Maven\Repository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;E:\Maven\Repository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;E:\Maven\Repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;E:\Maven\Repository\joda-time\joda-time\2.3\joda-time-2.3.jar;E:\Maven\Repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;E:\Maven\Repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;E:\Maven\Repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;E:\Maven\Repository\com\google\code\gson\gson\2.9.1\gson-2.9.1.jar;E:\Maven\Repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;E:\Maven\Repository\com\thoughtworks\xstream\xstream\1.4.19\xstream-1.4.19.jar;E:\Maven\Repository\io\github\x-stream\mxparser\1.2.2\mxparser-1.2.2.jar;E:\Maven\Repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;E:\Maven\Repository\com\netflix\servo\servo-core\0.12.21\servo-core-0.12.21.jar;E:\Maven\Repository\com\google\guava\guava\19.0\guava-19.0.jar;E:\Maven\Repository\org\apache\httpcomponents\httpclient\4.5.14\httpclient-4.5.14.jar;E:\Maven\Repository\org\apache\httpcomponents\httpcore\4.4.16\httpcore-4.4.16.jar;E:\Maven\Repository\commons-configuration\commons-configuration\1.10\commons-configuration-1.10.jar;E:\Maven\Repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;E:\Maven\Repository\org\codehaus\jettison\jettison\1.4.0\jettison-1.4.0.jar;E:\Maven\Repository\org\apache\httpcomponents\client5\httpclient5\5.1.4\httpclient5-5.1.4.jar;E:\Maven\Repository\org\apache\httpcomponents\core5\httpcore5\5.1.5\httpcore5-5.1.5.jar;E:\Maven\Repository\org\apache\httpcomponents\core5\httpcore5-h2\5.1.5\httpcore5-h2-5.1.5.jar;E:\Maven\Repository\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;E:\Maven\Repository\com\netflix\eureka\eureka-client-jersey3\2.0.0\eureka-client-jersey3-2.0.0.jar;E:\Maven\Repository\org\glassfish\jersey\connectors\jersey-apache-connector\3.1.1\jersey-apache-connector-3.1.1.jar;E:\Maven\Repository\com\netflix\eureka\eureka-core-jersey3\2.0.0\eureka-core-jersey3-2.0.0.jar;E:\Maven\Repository\com\netflix\eureka\eureka-core\2.0.0\eureka-core-2.0.0.jar;E:\Maven\Repository\jakarta\servlet\jakarta.servlet-api\6.0.0\jakarta.servlet-api-6.0.0.jar;E:\Maven\Repository\org\glassfish\jersey\containers\jersey-container-servlet\3.1.1\jersey-container-servlet-3.1.1.jar;E:\Maven\Repository\org\glassfish\jersey\containers\jersey-container-servlet-core\3.1.1\jersey-container-servlet-core-3.1.1.jar;E:\Maven\Repository\org\glassfish\jersey\core\jersey-common\3.1.1\jersey-common-3.1.1.jar;E:\Maven\Repository\org\glassfish\hk2\osgi-resource-locator\1.0.3\osgi-resource-locator-1.0.3.jar;E:\Maven\Repository\jakarta\ws\rs\jakarta.ws.rs-api\3.1.0\jakarta.ws.rs-api-3.1.0.jar;E:\Maven\Repository\org\glassfish\jersey\core\jersey-server\3.1.1\jersey-server-3.1.1.jar;E:\Maven\Repository\jakarta\validation\jakarta.validation-api\3.0.2\jakarta.validation-api-3.0.2.jar;E:\Maven\Repository\org\glassfish\jersey\core\jersey-client\3.1.1\jersey-client-3.1.1.jar;E:\Maven\Repository\org\glassfish\jersey\inject\jersey-hk2\3.1.1\jersey-hk2-3.1.1.jar;E:\Maven\Repository\org\glassfish\hk2\hk2-locator\3.0.3\hk2-locator-3.0.3.jar;E:\Maven\Repository\org\glassfish\hk2\external\aopalliance-repackaged\3.0.3\aopalliance-repackaged-3.0.3.jar;E:\Maven\Repository\org\glassfish\hk2\hk2-utils\3.0.3\hk2-utils-3.0.3.jar;E:\Maven\Repository\org\javassist\javassist\3.29.0-GA\javassist-3.29.0-GA.jar;E:\Maven\Repository\org\glassfish\hk2\spring-bridge\3.0.3\spring-bridge-3.0.3.jar;E:\Maven\Repository\org\glassfish\hk2\hk2-api\3.0.3\hk2-api-3.0.3.jar;E:\Maven\Repository\jakarta\inject\jakarta.inject-api\2.0.1\jakarta.inject-api-2.0.1.jar;E:\Maven\Repository\com\fasterxml\jackson\dataformat\jackson-dataformat-xml\2.14.2\jackson-dataformat-xml-2.14.2.jar;E:\Maven\Repository\org\codehaus\woodstox\stax2-api\4.2.1\stax2-api-4.2.1.jar;E:\Maven\Repository\com\fasterxml\woodstox\woodstox-core\6.5.0\woodstox-core-6.5.0.jar;E:\Maven\Repository\org\springframework\cloud\spring-cloud-starter-loadbalancer\4.0.2\spring-cloud-starter-loadbalancer-4.0.2.jar;E:\Maven\Repository\org\springframework\cloud\spring-cloud-loadbalancer\4.0.2\spring-cloud-loadbalancer-4.0.2.jar;E:\Maven\Repository\io\projectreactor\reactor-core\3.5.5\reactor-core-3.5.5.jar;E:\Maven\Repository\org\reactivestreams\reactive-streams\1.0.4\reactive-streams-1.0.4.jar;E:\Maven\Repository\io\projectreactor\addons\reactor-extra\3.5.1\reactor-extra-3.5.1.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-starter-cache\3.0.6\spring-boot-starter-cache-3.0.6.jar;E:\Maven\Repository\com\stoyanr\evictor\1.0.0\evictor-1.0.0.jar;E:\Maven\Repository\org\glassfish\jaxb\jaxb-runtime\4.0.2\jaxb-runtime-4.0.2.jar;E:\Maven\Repository\org\glassfish\jaxb\jaxb-core\4.0.2\jaxb-core-4.0.2.jar;E:\Maven\Repository\org\eclipse\angus\angus-activation\2.0.0\angus-activation-2.0.0.jar;E:\Maven\Repository\org\glassfish\jaxb\txw2\4.0.2\txw2-4.0.2.jar;E:\Maven\Repository\com\sun\istack\istack-commons-runtime\4.1.1\istack-commons-runtime-4.1.1.jar;E:\Maven\Repository\com\github\ben-manes\caffeine\caffeine\3.1.6\caffeine-3.1.6.jar;E:\Maven\Repository\org\checkerframework\checker-qual\3.33.0\checker-qual-3.33.0.jar;E:\Maven\Repository\com\google\errorprone\error_prone_annotations\2.18.0\error_prone_annotations-2.18.0.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-devtools\3.0.6\spring-boot-devtools-3.0.6.jar;E:\Maven\Repository\org\springframework\boot\spring-boot\3.0.6\spring-boot-3.0.6.jar;E:\Maven\Repository\org\springframework\boot\spring-boot-autoconfigure\3.0.6\spring-boot-autoconfigure-3.0.6.jar;E:\Maven\Repository\org\projectlombok\lombok\1.18.26\lombok-1.18.26.jar;E:\Maven\Repository\org\slf4j\slf4j-api\2.0.7\slf4j-api-2.0.7.jar;E:\Maven\Repository\jakarta\xml\bind\jakarta.xml.bind-api\4.0.0\jakarta.xml.bind-api-4.0.0.jar;E:\Maven\Repository\jakarta\activation\jakarta.activation-api\2.1.1\jakarta.activation-api-2.1.1.jar;E:\Maven\Repository\org\springframework\spring-core\6.0.8\spring-core-6.0.8.jar;E:\Maven\Repository\org\springframework\spring-jcl\6.0.8\spring-jcl-6.0.8.jar com.xu.eureka.EurekaApplication
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.6)
2023-05-18T11:54:34.761+08:00 INFO 27992 --- [ restartedMain] com.xu.eureka.EurekaApplication : Starting EurekaApplication using Java 17.0.7 with PID 27992 (E:\SoureCode\Learn\eureka-server\target\classes started by xuyq in E:\SoureCode\Learn\eureka-server)
2023-05-18T11:54:34.765+08:00 INFO 27992 --- [ restartedMain] com.xu.eureka.EurekaApplication : No active profile set, falling back to 1 default profile: "default"
2023-05-18T11:54:34.824+08:00 INFO 27992 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2023-05-18T11:54:34.824+08:00 INFO 27992 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2023-05-18T11:54:35.801+08:00 INFO 27992 --- [ restartedMain] o.s.cloud.context.scope.GenericScope : BeanFactory id=92ee8310-e18b-3993-a1c2-03e356109b2c
2023-05-18T11:54:36.288+08:00 INFO 27992 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9000 (http)
2023-05-18T11:54:36.295+08:00 INFO 27992 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2023-05-18T11:54:36.295+08:00 INFO 27992 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.8]
2023-05-18T11:54:36.353+08:00 INFO 27992 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2023-05-18T11:54:36.354+08:00 INFO 27992 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1528 ms
2023-05-18T11:54:37.157+08:00 INFO 27992 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2023-05-18T11:54:37.160+08:00 INFO 27992 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2023-05-18T11:54:37.288+08:00 INFO 27992 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2023-05-18T11:54:37.288+08:00 INFO 27992 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2023-05-18T11:54:38.026+08:00 INFO 27992 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2023-05-18T11:54:38.123+08:00 INFO 27992 --- [ restartedMain] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses RestTemplate.
2023-05-18T11:54:38.211+08:00 INFO 27992 --- [ restartedMain] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
2023-05-18T11:54:38.240+08:00 INFO 27992 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2023-05-18T11:54:38.240+08:00 INFO 27992 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor query for data.
2023-05-18T11:54:38.249+08:00 INFO 27992 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1684382078248 with initial instances count: 0
2023-05-18T11:54:38.281+08:00 INFO 27992 --- [ restartedMain] c.n.eureka.DefaultEurekaServerContext : Initializing ...
2023-05-18T11:54:38.284+08:00 INFO 27992 --- [ restartedMain] c.n.eureka.cluster.PeerEurekaNodes : Adding new peer nodes [http://127.0.0.1:9000/eureka/]
2023-05-18T11:54:38.369+08:00 INFO 27992 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2023-05-18T11:54:38.370+08:00 INFO 27992 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2023-05-18T11:54:38.370+08:00 INFO 27992 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2023-05-18T11:54:38.370+08:00 INFO 27992 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2023-05-18T11:54:38.472+08:00 INFO 27992 --- [ restartedMain] c.n.eureka.cluster.PeerEurekaNodes : Replica node URL: http://127.0.0.1:9000/eureka/
2023-05-18T11:54:38.477+08:00 INFO 27992 --- [ restartedMain] c.n.e.registry.AbstractInstanceRegistry : Finished initializing remote region registries. All known remote regions: []
2023-05-18T11:54:38.478+08:00 INFO 27992 --- [ restartedMain] c.n.eureka.DefaultEurekaServerContext : Initialized
2023-05-18T11:54:38.490+08:00 INFO 27992 --- [ restartedMain] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s) beneath base path '/actuator'
2023-05-18T11:54:38.538+08:00 INFO 27992 --- [ restartedMain] o.s.c.n.e.s.EurekaServiceRegistry : Registering application EUREKA-SERVER with eureka with status UP
2023-05-18T11:54:38.552+08:00 INFO 27992 --- [ Thread-15] o.s.c.n.e.server.EurekaServerBootstrap : isAws returned false
2023-05-18T11:54:38.553+08:00 INFO 27992 --- [ Thread-15] o.s.c.n.e.server.EurekaServerBootstrap : Initialized server context
2023-05-18T11:54:38.553+08:00 INFO 27992 --- [ Thread-15] c.n.e.r.PeerAwareInstanceRegistryImpl : Got 1 instances from neighboring DS node
2023-05-18T11:54:38.553+08:00 INFO 27992 --- [ Thread-15] c.n.e.r.PeerAwareInstanceRegistryImpl : Renew threshold is: 1
2023-05-18T11:54:38.553+08:00 INFO 27992 --- [ Thread-15] c.n.e.r.PeerAwareInstanceRegistryImpl : Changing status to UP
2023-05-18T11:54:38.558+08:00 INFO 27992 --- [ Thread-15] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2023-05-18T11:54:38.567+08:00 INFO 27992 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9000 (http) with context path ''
2023-05-18T11:54:38.568+08:00 INFO 27992 --- [ restartedMain] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 9000
2023-05-18T11:54:38.664+08:00 INFO 27992 --- [ restartedMain] com.xu.eureka.EurekaApplication : Started EurekaApplication in 4.386 seconds (process running for 4.887)
http://127.0.0.1:9000/ 查看注册中心