{"id":48753,"date":"2025-07-30T13:18:07","date_gmt":"2025-07-30T05:18:07","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/48753.html"},"modified":"2025-07-30T13:18:07","modified_gmt":"2025-07-30T05:18:07","slug":"%e6%9c%8d%e5%8a%a1%e5%8f%91%e7%8e%b0%ef%bc%9aeureka-%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%88service-discovery-eureka-server%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/48753.html","title":{"rendered":"\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09"},"content":{"rendered":"<h2>\u6784\u5efa Spring Cloud Eureka Server \u6ce8\u518c\u4e2d\u5fc3<\/h2>\n<h3>\u4e00\u3001\u76ee\u6807<\/h3>\n<p>\u521b\u5efa\u4e00\u4e2a\u72ec\u7acb\u7684 Spring Cloud Eureka Server&#xff0c;\u4f5c\u4e3a\u5fae\u670d\u52a1\u67b6\u6784\u7684\u670d\u52a1\u6ce8\u518c\u4e0e\u53d1\u73b0\u4e2d\u5fc3\u3002<\/p>\n<h3>\u4e8c\u3001\u5b98\u65b9\u6587\u6863<\/h3>\n<h4>Spring Cloud \u4e3b\u9875<\/h4>\n<p>https:\/\/spring.io\/projects\/spring-cloud<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051749-6889aafdba7f4.png\" alt=\"\" \/><\/p>\n<h4>Eureka Server \u5b98\u65b9\u6587\u6863<\/h4>\n<p>\u670d\u52a1\u53d1\u73b0&#xff1a;Eureka \u670d\u52a1\u5668&#xff08;Service Discovery: Eureka Server&#xff09;&#xff1a; https:\/\/docs.spring.io\/spring-cloud-netflix\/reference\/spring-cloud-netflix.html#spring-cloud-eureka-server<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051750-6889aafee594b.png\" alt=\"\" \/><\/p>\n<h4>\u5982\u4f55\u5305\u542b Eureka \u670d\u52a1\u5668<\/h4>\n<p>\u8981\u5728\u9879\u76ee\u4e2d\u5305\u542b Eureka Server&#xff0c;\u8bf7\u4f7f\u7528 group ID \u4e3a org.springframework.cloud \u3001artifact ID \u4e3a spring-cloud-starter-netflix-eureka-server \u7684 starter\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051751-6889aaffc76bd.png\" alt=\"\" \/><\/p>\n<h4>\u5982\u4f55\u8fd0\u884c Eureka \u670d\u52a1\u5668<\/h4>\n<p>\u6ce8\u610f&#xff1a;&#064;EnableEurekaServer \u6ce8\u89e3\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051752-6889ab0077b6f.png\" alt=\"\" \/><\/p>\n<h4>\u5355\u673a\u6a21\u5f0f&#xff08;\u72ec\u7acb\u6a21\u5f0f&#xff09;<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051753-6889ab0121ac4.png\" alt=\"\" \/><\/p>\n<p>application.yml (\u72ec\u7acb Eureka \u670d\u52a1\u5668)<\/p>\n<p><span class=\"token comment\"># application.yml (\u72ec\u7acb Eureka \u670d\u52a1\u5668)<\/span><br \/>\n<span class=\"token key atrule\">server<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">port<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">8761<\/span><\/p>\n<p><span class=\"token key atrule\">eureka<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">instance<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> localhost<br \/>\n  <span class=\"token key atrule\">client<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">registerWithEureka<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">false<\/span><br \/>\n    <span class=\"token key atrule\">fetchRegistry<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">false<\/span><br \/>\n    <span class=\"token key atrule\">serviceUrl<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">defaultZone<\/span><span class=\"token punctuation\">:<\/span> http<span class=\"token punctuation\">:<\/span>\/\/$<span class=\"token punctuation\">{<\/span>eureka.instance.hostname<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">:<\/span>$<span class=\"token punctuation\">{<\/span>server.port<span class=\"token punctuation\">}<\/span>\/eureka\/<\/p>\n<h4>\u9ad8\u53ef\u7528\u6a21\u5f0f&#xff08;Peer Awareness&#xff09;<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051754-6889ab0242d87.png\" alt=\"\" \/><\/p>\n<p>application.yml (\u4e24\u4e2a\u76f8\u4e92\u611f\u77e5\u7684 Eureka \u670d\u52a1\u5668)<\/p>\n<p><span class=\"token comment\"># application.yml (\u4e24\u4e2a\u76f8\u4e92\u611f\u77e5\u7684 Eureka \u670d\u52a1\u5668)<\/span><br \/>\n<span class=\"token comment\"># &#8212;<\/span><br \/>\n<span class=\"token key atrule\">spring<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">profiles<\/span><span class=\"token punctuation\">:<\/span> peer1<br \/>\n<span class=\"token key atrule\">eureka<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">instance<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> peer1<br \/>\n  <span class=\"token key atrule\">client<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">serviceUrl<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">defaultZone<\/span><span class=\"token punctuation\">:<\/span> https<span class=\"token punctuation\">:<\/span>\/\/peer2\/eureka\/<\/p>\n<p><span class=\"token comment\"># &#8212;<\/span><br \/>\n<span class=\"token key atrule\">spring<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">profiles<\/span><span class=\"token punctuation\">:<\/span> peer2<br \/>\n<span class=\"token key atrule\">eureka<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">instance<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> peer2<br \/>\n  <span class=\"token key atrule\">client<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">serviceUrl<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">defaultZone<\/span><span class=\"token punctuation\">:<\/span> https<span class=\"token punctuation\">:<\/span>\/\/peer1\/eureka\/<\/p>\n<p>application.yml (\u4e09\u4e2a\u76f8\u4e92\u611f\u77e5\u7684 Eureka \u670d\u52a1\u5668)<\/p>\n<p><span class=\"token comment\"># application.yml (\u4e09\u4e2a\u76f8\u4e92\u611f\u77e5\u7684 Eureka \u670d\u52a1\u5668)<\/span><br \/>\n<span class=\"token key atrule\">eureka<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">client<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">serviceUrl<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">defaultZone<\/span><span class=\"token punctuation\">:<\/span> https<span class=\"token punctuation\">:<\/span>\/\/peer1\/eureka\/<span class=\"token punctuation\">,<\/span>http<span class=\"token punctuation\">:<\/span>\/\/peer2\/eureka\/<span class=\"token punctuation\">,<\/span>http<span class=\"token punctuation\">:<\/span>\/\/peer3\/eureka\/<\/p>\n<p><span class=\"token comment\"># &#8212;<\/span><br \/>\n<span class=\"token key atrule\">spring<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">profiles<\/span><span class=\"token punctuation\">:<\/span> peer1<br \/>\n<span class=\"token key atrule\">eureka<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">instance<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> peer1<\/p>\n<p><span class=\"token comment\"># &#8212;<\/span><br \/>\n<span class=\"token key atrule\">spring<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">profiles<\/span><span class=\"token punctuation\">:<\/span> peer2<br \/>\n<span class=\"token key atrule\">eureka<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">instance<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> peer2<\/p>\n<p><span class=\"token comment\"># &#8212;<\/span><br \/>\n<span class=\"token key atrule\">spring<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">profiles<\/span><span class=\"token punctuation\">:<\/span> peer3<br \/>\n<span class=\"token key atrule\">eureka<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">instance<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> peer3<\/p>\n<h4>\u4f7f\u7528 Eureka \u670d\u52a1\u5668\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1<\/h4>\n<p>URL \u5305\u542b\u51ed\u8bc1&#xff08;curl \u98ce\u683c&#xff0c;\u5982\u4e0b\u6240\u793a&#xff1a; user:password&#064;localhost:8761\/eureka &#xff09;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051755-6889ab0376376.png\" alt=\"\" \/><\/p>\n<h3>\u4e09\u3001\u521b\u5efa Spring Boot \u9879\u76ee<\/h3>\n<h4>\u6280\u672f\u6808<\/h4>\n<ul>\n<li>Java (JDK): 21<\/li>\n<li>Spring Boot: 3.5.3<\/li>\n<li>Spring Cloud Netflix Eureka Server: 2025.0.0 (spring-cloud-starter-netflix-eureka-server)<\/li>\n<\/ul>\n<h4>\u9879\u76ee\u521b\u5efa\u65b9\u5f0f<\/h4>\n<p>\u63a8\u8350\u4f7f\u7528 Spring Initializr \u3002<\/p>\n<ul>\n<li>\u9009\u62e9\u9879\u76ee\u7c7b\u578b&#xff1a;Maven<\/li>\n<li>\u9009\u62e9\u8bed\u8a00&#xff1a;Java<\/li>\n<li>\u586b\u5199 Group, Artifact (\u5982 com.example.hello, hello-eureka-server)<\/li>\n<li>\u9009\u62e9 Spring Boot \u7248\u672c&#xff1a;3.5.3<\/li>\n<li>\u6dfb\u52a0\u4f9d\u8d56&#xff1a;Eureka Server<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051757-6889ab059bf1c.png\" alt=\"\u521b\u5efa\u9879\u76ee\u622a\u56fe\" \/> \u56fe\u793a&#xff1a;\u5728\u9879\u76ee\u521b\u5efa\u5de5\u5177\u4e2d\u9009\u62e9 Eureka Server \u4f9d\u8d56\u3002<\/p>\n<h3>\u56db\u3001\u9879\u76ee\u914d\u7f6e<\/h3>\n<h4>1. \u914d\u7f6e POM \u6587\u4ef6 (pom.xml)<\/h4>\n<p>\u786e\u4fdd pom.xml \u5305\u542b\u5fc5\u8981\u7684\u4f9d\u8d56\u548c\u7248\u672c\u7ba1\u7406&#xff1a;<\/p>\n<p><span class=\"token prolog\">&lt;?xml version&#061;&#034;1.0&#034; encoding&#061;&#034;UTF-8&#034;?&gt;<\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>project<\/span> <span class=\"token attr-name\">xmlns<\/span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">&#061;<\/span><span class=\"token punctuation\">&#034;<\/span>http:\/\/maven.apache.org\/POM\/4.0.0<span class=\"token punctuation\">&#034;<\/span><\/span> <span class=\"token attr-name\"><span class=\"token namespace\">xmlns:<\/span>xsi<\/span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">&#061;<\/span><span class=\"token punctuation\">&#034;<\/span>http:\/\/www.w3.org\/2001\/XMLSchema-instance<span class=\"token punctuation\">&#034;<\/span><\/span><br \/>\n<span class=\"token attr-name\"><span class=\"token namespace\">xsi:<\/span>schemaLocation<\/span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">&#061;<\/span><span class=\"token punctuation\">&#034;<\/span>http:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd<span class=\"token punctuation\">&#034;<\/span><\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>modelVersion<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>4.0.0<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>modelVersion<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<p><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>parent<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.springframework.boot<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>spring-boot-starter-parent<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>3.5.3<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>relativePath<\/span><span class=\"token punctuation\">\/&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>parent<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<p><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>com.example.hello<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>hello-eureka-server<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>1.0.0<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>name<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>hello-eureka-server<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>name<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>description<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>Eureka\u6ce8\u518c\u4e2d\u5fc3\u670d\u52a1\u5668<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>description<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<p><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>properties<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>java.version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>21<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>java.version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>spring-cloud.version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>2025.0.0<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>spring-cloud.version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>properties<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<p><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependencies<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.springframework.cloud<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>spring-cloud-starter-netflix-eureka-server<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<p><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.springframework.boot<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>spring-boot-starter-test<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>scope<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>test<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>scope<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependencies<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependencyManagement<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependencies<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.springframework.cloud<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>spring-cloud-dependencies<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>${spring-cloud.version}<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>type<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>pom<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>type<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>scope<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>import<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>scope<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependencies<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependencyManagement<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<p><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>build<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>plugins<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>plugin<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.springframework.boot<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>spring-boot-maven-plugin<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>plugin<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>plugins<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>build<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<p><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>project<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<h4>2. \u914d\u7f6e\u5e94\u7528\u5c5e\u6027 (application.yml)<\/h4>\n<p>\u5728 src\/main\/resources\/application.yml \u4e2d\u6dfb\u52a0 Eureka Server \u914d\u7f6e&#xff1a;<\/p>\n<p><span class=\"token key atrule\">spring<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">application<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> hello<span class=\"token punctuation\">&#8211;<\/span>eureka<span class=\"token punctuation\">&#8211;<\/span>server<\/p>\n<p><span class=\"token key atrule\">server<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">port<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">8761<\/span> <span class=\"token comment\"># Eureka Server\u9ed8\u8ba4\u7aef\u53e3<\/span><\/p>\n<p><span class=\"token key atrule\">eureka<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">instance<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># \u8bbe\u7f6eEureka Server\u7684\u4e3b\u673a\u540d<\/span><br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> localhost<br \/>\n  <span class=\"token key atrule\">client<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># \u5173\u952e\u914d\u7f6e&#xff1a;\u7981\u6b62 Eureka Server \u5c06\u81ea\u5df1\u6ce8\u518c\u5230\u6ce8\u518c\u4e2d\u5fc3&#xff08;\u907f\u514d\u81ea\u6ce8\u518c&#xff09;<\/span><br \/>\n    <span class=\"token key atrule\">register-with-eureka<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">false<\/span><br \/>\n    <span class=\"token comment\"># \u5173\u952e\u914d\u7f6e&#xff1a;\u7981\u6b62 Eureka Server \u4ece\u6ce8\u518c\u4e2d\u5fc3\u83b7\u53d6\u6ce8\u518c\u8868\u4fe1\u606f&#xff08;\u5355\u673a\u6a21\u5f0f\u4e0b\u4e0d\u9700\u8981&#xff09;<\/span><br \/>\n    <span class=\"token key atrule\">fetch-registry<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">false<\/span><br \/>\n    <span class=\"token key atrule\">service-url<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token comment\"># \u6307\u5b9a Eureka Server \u7684\u8bbf\u95ee\u5730\u5740\u3002<\/span><br \/>\n      <span class=\"token comment\"># ${eureka.instance.hostname} \u548c ${server.port} \u5f15\u7528\u4e0a\u9762\u7684\u914d\u7f6e\u3002<\/span><br \/>\n      <span class=\"token comment\"># \u5728\u96c6\u7fa4\u6a21\u5f0f\u4e0b&#xff0c;\u8fd9\u91cc\u4f1a\u914d\u7f6e\u5176\u4ed6 Eureka Server \u8282\u70b9\u7684\u5730\u5740\u3002<\/span><br \/>\n      <span class=\"token key atrule\">defaultZone<\/span><span class=\"token punctuation\">:<\/span> http<span class=\"token punctuation\">:<\/span>\/\/$<span class=\"token punctuation\">{<\/span>eureka.instance.hostname<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">:<\/span>$<span class=\"token punctuation\">{<\/span>server.port<span class=\"token punctuation\">}<\/span>\/eureka\/<\/p>\n<h5>\u5173\u952e\u914d\u7f6e\u89e3\u91ca<\/h5>\n<ul>\n<li>register-with-eureka&#xff1a;\u6307\u793a\u6b64\u5b9e\u4f8b\u662f\u5426\u5e94\u5411 Eureka \u670d\u52a1\u5668\u6ce8\u518c\u5176\u4fe1\u606f\u4ee5\u4f9b\u5176\u4ed6\u4eba\u53d1\u73b0\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b&#xff0c;\u60a8\u4e0d\u5e0c\u671b\u81ea\u5df1\u7684\u5b9e\u4f8b\u88ab\u53d1\u73b0&#xff0c;\u800c\u53ea\u60f3\u53d1\u73b0\u5176\u4ed6\u5b9e\u4f8b\u3002\u9ed8\u8ba4\u503c\u4e3a true\u3002<\/li>\n<li>fetch-registry&#xff1a;\u6307\u793a\u6b64\u5ba2\u6237\u7aef\u662f\u5426\u5e94\u4ece\u5c24\u91cc\u5361\u670d\u52a1\u5668\u83b7\u53d6 Eureka \u6ce8\u518c\u8868\u4fe1\u606f\u3002\u9ed8\u8ba4\u503c\u4e3a true\u3002<\/li>\n<li>defaultZone&#xff1a;\u5ba2\u6237\u7aef&#xff08;\u5176\u4ed6\u5fae\u670d\u52a1&#xff09;\u7528\u6765\u6ce8\u518c\u548c\u53d1\u73b0\u670d\u52a1\u7684\u5730\u5740\u3002\u5355\u673a\u6a21\u5f0f\u4e0b\u6307\u5411\u81ea\u5df1\u3002<\/li>\n<\/ul>\n<h5>\u6e90\u4ee3\u7801&#xff08;EurekaClientConfigBean&#xff0c;EurekaConstants&#xff09;<\/h5>\n<p><span class=\"token comment\">\/**<br \/>\n * Indicates whether or not this instance should register its information with eureka<br \/>\n * server for discovery by others.<br \/>\n *<br \/>\n * In some cases, you do not want your instances to be discovered whereas you just<br \/>\n * want do discover other instances.<br \/>\n *\/<\/span><br \/>\n<span class=\"token keyword\">private<\/span> <span class=\"token keyword\">boolean<\/span> registerWithEureka <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/**<br \/>\n * Indicates whether this client should fetch eureka registry information from eureka<br \/>\n * server.<br \/>\n *\/<\/span><br \/>\n<span class=\"token keyword\">private<\/span> <span class=\"token keyword\">boolean<\/span> fetchRegistry <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/**<br \/>\n * Map of availability zone to list of fully qualified URLs to communicate with eureka<br \/>\n * server. Each value can be a single URL or a comma separated list of alternative<br \/>\n * locations.<br \/>\n *<br \/>\n * Typically the eureka server URLs carry protocol,host,port,context and version<br \/>\n * information if any. Example:<br \/>\n * https:\/\/ec2-256-156-243-129.compute-1.amazonaws.com:7001\/eureka\/<br \/>\n *<br \/>\n * The changes are effective at runtime at the next service url refresh cycle as<br \/>\n * specified by eurekaServiceUrlPollIntervalSeconds.<br \/>\n *\/<\/span><br \/>\n<span class=\"token keyword\">private<\/span> <span class=\"token class-name\">Map<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">String<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">String<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> serviceUrl <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">HashMap<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>serviceUrl<span class=\"token punctuation\">.<\/span><span class=\"token function\">put<\/span><span class=\"token punctuation\">(<\/span><span class=\"token constant\">DEFAULT_ZONE<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant\">DEFAULT_URL<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/**<br \/>\n * Default availability zone if none is resolved based on region.<br \/>\n *\/<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">final<\/span> <span class=\"token class-name\">String<\/span> <span class=\"token constant\">DEFAULT_ZONE<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;defaultZone&#034;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/**<br \/>\n * Default Eureka URL.<br \/>\n *\/<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">final<\/span> <span class=\"token class-name\">String<\/span> <span class=\"token constant\">DEFAULT_URL<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;http:\/\/localhost:8761&#034;<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token constant\">DEFAULT_PREFIX<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token string\">&#034;\/&#034;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/**<br \/>\n * Default Eureka prefix.<br \/>\n *\/<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">final<\/span> <span class=\"token class-name\">String<\/span> <span class=\"token constant\">DEFAULT_PREFIX<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;\/eureka&#034;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h5>\u5b98\u65b9\u6587\u6863\u8bf4\u660e<\/h5>\n<p>defaultZone \u5c5e\u6027\u533a\u5206\u5927\u5c0f\u5199&#xff0c;\u9700\u8981\u4f7f\u7528\u9a7c\u5cf0\u547d\u540d\u6cd5&#xff0c;\u56e0\u4e3a serviceUrl \u5c5e\u6027\u662f\u4e00\u4e2a Map&lt;String, String&gt; \u3002\u56e0\u6b64&#xff0c; defaultZone \u5c5e\u6027\u4e0d\u9075\u5faa Spring Boot \u7684\u5e38\u89c4\u86c7\u5f62\u547d\u540d\u6cd5 default-zone \u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051759-6889ab07dffa5.png\" alt=\"\" \/><\/p>\n<h3>\u4e94\u3001\u7f16\u5199\u542f\u52a8\u7c7b<\/h3>\n<p>\u5728 Spring Boot \u4e3b\u5e94\u7528\u7c7b\u4e0a\u6dfb\u52a0 &#064;EnableEurekaServer \u6ce8\u89e3&#xff0c;\u6fc0\u6d3b Eureka Server \u529f\u80fd\u3002<\/p>\n<p><span class=\"token keyword\">package<\/span> <span class=\"token namespace\">com<span class=\"token punctuation\">.<\/span>example<span class=\"token punctuation\">.<\/span>hello<span class=\"token punctuation\">.<\/span>eureka<span class=\"token punctuation\">.<\/span>server<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>boot<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">SpringApplication<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>boot<span class=\"token punctuation\">.<\/span>autoconfigure<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">SpringBootApplication<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>cloud<span class=\"token punctuation\">.<\/span>netflix<span class=\"token punctuation\">.<\/span>eureka<span class=\"token punctuation\">.<\/span>server<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">EnableEurekaServer<\/span><\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token annotation punctuation\">&#064;EnableEurekaServer<\/span> <span class=\"token comment\">\/\/ \u6838\u5fc3\u6ce8\u89e3&#xff1a;\u542f\u7528 Eureka Server \u529f\u80fd<\/span><br \/>\n<span class=\"token annotation punctuation\">&#064;SpringBootApplication<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">HelloEurekaServerApplication<\/span> <span class=\"token punctuation\">{<\/span><\/p>\n<p>    <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">String<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> args<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token class-name\">SpringApplication<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">run<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">HelloEurekaServerApplication<\/span><span class=\"token punctuation\">.<\/span><span class=\"token keyword\">class<\/span><span class=\"token punctuation\">,<\/span> args<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token punctuation\">}<\/span><\/p>\n<h3>\u516d\u3001\u542f\u52a8 Eureka Server<\/h3>\n<p>\u8fd0\u884c HelloEurekaServerApplication \u7684 main \u65b9\u6cd5\u542f\u52a8\u670d\u52a1\u5668\u3002<\/p>\n<h4>\u5173\u952e\u542f\u52a8\u65e5\u5fd7\u5206\u6790<\/h4>\n<p>\u542f\u52a8\u8fc7\u7a0b\u4e2d&#xff0c;\u6ce8\u610f\u89c2\u5bdf\u4ee5\u4e0b\u5173\u952e\u65e5\u5fd7\u4fe1\u606f&#xff0c;\u786e\u8ba4\u670d\u52a1\u542f\u52a8\u6210\u529f\u4e14\u914d\u7f6e\u751f\u6548&#xff1a;<\/p>\n<p>  .   ____          _            __ _ _<br \/>\n \/\\\\\\\\ \/ ___&#039;_ __ _ _(_)_ __  __ _ \\\\ \\\\ \\\\ \\\\<br \/>\n( ( )\\\\___ | &#039;_ | &#039;_| | &#039;_ \\\\\/ _&#096; | \\\\ \\\\ \\\\ \\\\<br \/>\n \\\\\\\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )<br \/>\n  &#039;  |____| .__|_| |_|_| |_\\\\__, | \/ \/ \/ \/<br \/>\n &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;|_|&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;|___\/&#061;\/_\/_\/_\/<\/p>\n<p> :: Spring Boot ::                (v3.5.3)<\/p>\n<p>2025-06-22T11:00:19.834&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.e.h.e.s.HelloEurekaServerApplication   : Starting HelloEurekaServerApplication using Java 21.0.1 with PID 4240 (E:\\\\hello-world\\\\hello-eureka-server\\\\target\\\\classes started by SongGuanxun in E:\\\\hello-world\\\\hello-eureka-server)<br \/>\n2025-06-22T11:00:19.842&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.e.h.e.s.HelloEurekaServerApplication   : No active profile set, falling back to 1 default profile: &#034;default&#034;<br \/>\n2025-06-22T11:00:24.548&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id&#061;8a66a792-6a96-32b9-b70c-573fd48e1799<br \/>\n2025-06-22T11:00:26.372&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 8761 (http)<br \/>\n2025-06-22T11:00:26.506&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]<br \/>\n2025-06-22T11:00:26.508&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat\/10.1.42]<br \/>\n2025-06-22T11:00:26.707&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.a.c.c.C.[Tomcat].[localhost].[\/]       : Initializing Spring embedded WebApplicationContext<br \/>\n2025-06-22T11:00:26.711&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 6658 ms<br \/>\n2025-06-22T11:00:30.462&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson<br \/>\n2025-06-22T11:00:30.466&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson<br \/>\n2025-06-22T11:00:31.415&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml<br \/>\n2025-06-22T11:00:31.415&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml<br \/>\n2025-06-22T11:00:32.018&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.s.v.b.OptionalValidatorFactoryBean     : Failed to set up a Bean Validation provider: jakarta.validation.NoProviderFoundException: Unable to create a Configuration, because no Jakarta Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.<br \/>\n2025-06-22T11:00:34.896&#043;08:00  WARN 4240 &#8212; [hello-eureka-server] [           main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it&#039;s recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.<br \/>\n2025-06-22T11:00:34.968&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING<br \/>\n2025-06-22T11:00:35.112&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1<br \/>\n2025-06-22T11:00:35.112&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.<br \/>\n2025-06-22T11:00:35.132&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1750561235121 with initial instances count: 0<br \/>\n2025-06-22T11:00:35.401&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.n.eureka.DefaultEurekaServerContext    : Initializing &#8230;<br \/>\n2025-06-22T11:00:35.406&#043;08:00  WARN 4240 &#8212; [hello-eureka-server] [           main] c.n.eureka.cluster.PeerEurekaNodes       : The replica size seems to be empty. Check the route 53 DNS Registry<br \/>\n2025-06-22T11:00:35.440&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.n.e.registry.AbstractInstanceRegistry  : Finished initializing remote region registries. All known remote regions: []<br \/>\n2025-06-22T11:00:35.440&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.n.eureka.DefaultEurekaServerContext    : Initialized<br \/>\n2025-06-22T11:00:35.469&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint beneath base path &#039;\/actuator&#039;<br \/>\n2025-06-22T11:00:35.647&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application HELLO-EUREKA-SERVER with eureka with status UP<br \/>\n2025-06-22T11:00:35.702&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [       Thread-9] o.s.c.n.e.server.EurekaServerBootstrap   : isAws returned false<br \/>\n2025-06-22T11:00:35.704&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [       Thread-9] o.s.c.n.e.server.EurekaServerBootstrap   : Initialized server context<br \/>\n2025-06-22T11:00:35.704&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 1 instances from neighboring DS node<br \/>\n2025-06-22T11:00:35.705&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 1<br \/>\n2025-06-22T11:00:35.705&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Changing status to UP<br \/>\n2025-06-22T11:00:35.716&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [       Thread-9] e.s.EurekaServerInitializerConfiguration : Started Eureka Server<br \/>\n2025-06-22T11:00:35.760&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 8761 (http) with context path &#039;\/&#039;<br \/>\n2025-06-22T11:00:35.763&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8761<br \/>\n2025-06-22T11:00:35.837&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [           main] c.e.h.e.s.HelloEurekaServerApplication   : Started HelloEurekaServerApplication in 18.559 seconds (process running for 21.967)<br \/>\n2025-06-22T11:01:35.708&#043;08:00  INFO 4240 &#8212; [hello-eureka-server] [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms<\/p>\n<p>\u6ce8\u610f\u65e5\u5fd7\u4e2d\u7684\u8b66\u544a&#xff1a;<\/p>\n<ul>\n<li>OptionalValidatorFactoryBean \u8b66\u544a&#xff1a;\u7f3a\u5c11 Bean Validation \u63d0\u4f9b\u8005&#xff08;\u5982 Hibernate Validator&#xff09;\u3002\u5982\u679c\u4e0d\u9700\u8981\u53c2\u6570\u9a8c\u8bc1\u529f\u80fd&#xff0c;\u53ef\u4ee5\u5ffd\u7565\u6b64\u8b66\u544a\u3002<\/li>\n<li>LoadBalancerCaffeineWarnLogger \u8b66\u544a&#xff1a;\u5efa\u8bae\u5728\u751f\u4ea7\u73af\u5883\u4f7f\u7528 Caffeine \u7f13\u5b58\u66ff\u4ee3\u9ed8\u8ba4\u7f13\u5b58\u3002\u5bf9\u4e8e\u5f00\u53d1\u6d4b\u8bd5&#xff0c;\u9ed8\u8ba4\u7f13\u5b58\u8db3\u591f\u3002<\/li>\n<\/ul>\n<h3>\u4e03\u3001\u9a8c\u8bc1 Eureka Server<\/h3>\n<li>\u8bbf\u95ee\u63a7\u5236\u53f0&#xff1a; \u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u8bbf\u95ee Eureka Server \u7684\u7ba1\u7406\u63a7\u5236\u53f0&#xff1a;http:\/\/localhost:8761\/\u3002<\/li>\n<li>\u67e5\u770b\u72b6\u6001&#xff1a;\n<ul>\n<li>Instances currently registered with Eureka \u533a\u57df\u663e\u793a\u5df2\u6ce8\u518c\u7684\u670d\u52a1\u5b9e\u4f8b\u3002\u521d\u59cb\u72b6\u6001\u4e0b&#xff0c;\u56e0\u4e3a\u914d\u7f6e\u4e86\u4e0d\u6ce8\u518c&#xff0c;\u8fd9\u91cc\u5e94\u8be5\u662f\u7a7a\u7684\u3002<\/li>\n<li>\u6ce8\u610f\u9875\u9762\u4e0a\u7684\u72b6\u6001\u4fe1\u606f&#xff08;\u5982 UP&#xff09;\u548c\u7cfb\u7edf\u72b6\u6001\u3002<\/li>\n<\/ul>\n<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051803-6889ab0b236d2.png\" alt=\"Eureka Server \u63a7\u5236\u53f0\u622a\u56fe\" \/><\/p>\n<p>\u56fe\u793a&#xff1a;\u6210\u529f\u542f\u52a8\u540e\u7684 Eureka Server \u7ba1\u7406\u63a7\u5236\u53f0\u9996\u9875\u3002\u6ce8\u610f &#xff0c;instances \u533a\u57df\u4e3a\u7a7a&#xff08;\u5c1a\u672a\u6ce8\u518c\u5176\u4ed6\u670d\u52a1&#xff09;\u3002<\/p>\n<h3>\u516b\u3001\u603b\u7ed3<\/h3>\n<p>\u81f3\u6b64&#xff0c;\u4e00\u4e2a\u57fa\u7840\u7684 Spring Cloud Eureka Server \u6ce8\u518c\u4e2d\u5fc3\u5df2\u7ecf\u6210\u529f\u642d\u5efa\u5e76\u8fd0\u884c\u5728 http:\/\/localhost:8761\u3002\u5173\u952e\u70b9\u5728\u4e8e&#xff1a;<\/p>\n<li>\u4f7f\u7528 spring-cloud-starter-netflix-eureka-server \u4f9d\u8d56\u3002<\/li>\n<li>\u5728\u542f\u52a8\u7c7b\u4e0a\u6dfb\u52a0 &#064;EnableEurekaServer \u6ce8\u89e3\u3002<\/li>\n<li>\u6b63\u786e\u914d\u7f6e application.yml&#xff0c;\u7279\u522b\u662f eureka.client.register-with-eureka&#061;false \u548c eureka.client.fetch-registry&#061;false \u5bf9\u4e8e\u5355\u673a\u6a21\u5f0f\u81f3\u5173\u91cd\u8981\u3002<\/li>\n<li>\u9ed8\u8ba4\u7aef\u53e3 8761 \u53ef\u901a\u8fc7 server.port \u4fee\u6539\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.4k\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u6784\u5efa\u4e00\u4e2aSpring Cloud Eureka Server\u6ce8\u518c\u4e2d\u5fc3\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a\u5b98\u65b9\u6587\u6863\u53c2\u8003\u3001\u521b\u5efaSpring Boot\u9879\u76ee\uff08\u4f7f\u7528JDK21\u548cSpring Boot 3.5.3\uff09\u3001\u6dfb\u52a0Eureka Server\u4f9d\u8d56\u914d\u7f6e\u3001\u4ee5\u53ca\u5173\u952e\u7684YML\u914d\u7f6e\u8bbe\u7f6e\uff08\u5982\u7aef\u53e38761\u3001\u7981\u7528\u81ea\u6ce8\u518c\u7b49\uff09\u3002\u6587\u7ae0\u63d0\u4f9b\u4e86\u5355\u673a\u6a21\u5f0f\u548c\u9ad8\u53ef\u7528\u6a21\u5f0f\u7684\u914d\u7f6e\u793a\u4f8b\uff0c\u5e76\u5f3a\u8c03\u4e86\u5173\u952e\u914d\u7f6e\u9879\u5982registerWithEureka: false\u7684\u91cd\u8981\u6027\uff0c\u786e\u4fddEureka Server\u4f5c\u4e3a\u72ec\u7acb\u7684\u670d\u52a1\u6ce8\u518c\u4e2d\u5fc3\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n","protected":false},"author":2,"featured_media":48743,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[838,98,963,3660],"topic":[],"class_list":["post-48753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-eureka","tag-spring-boot","tag-spring-cloud","tag-3660"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/48753.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.4k\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u6784\u5efa\u4e00\u4e2aSpring Cloud Eureka Server\u6ce8\u518c\u4e2d\u5fc3\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a\u5b98\u65b9\u6587\u6863\u53c2\u8003\u3001\u521b\u5efaSpring Boot\u9879\u76ee\uff08\u4f7f\u7528JDK21\u548cSpring Boot 3.5.3\uff09\u3001\u6dfb\u52a0Eureka Server\u4f9d\u8d56\u914d\u7f6e\u3001\u4ee5\u53ca\u5173\u952e\u7684YML\u914d\u7f6e\u8bbe\u7f6e\uff08\u5982\u7aef\u53e38761\u3001\u7981\u7528\u81ea\u6ce8\u518c\u7b49\uff09\u3002\u6587\u7ae0\u63d0\u4f9b\u4e86\u5355\u673a\u6a21\u5f0f\u548c\u9ad8\u53ef\u7528\u6a21\u5f0f\u7684\u914d\u7f6e\u793a\u4f8b\uff0c\u5e76\u5f3a\u8c03\u4e86\u5173\u952e\u914d\u7f6e\u9879\u5982registerWithEureka: false\u7684\u91cd\u8981\u6027\uff0c\u786e\u4fddEureka Server\u4f5c\u4e3a\u72ec\u7acb\u7684\u670d\u52a1\u6ce8\u518c\u4e2d\u5fc3\u6b63\u5e38\u8fd0\u884c\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/48753.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-30T05:18:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051749-6889aafdba7f4.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/48753.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/48753.html\",\"name\":\"\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-30T05:18:07+00:00\",\"dateModified\":\"2025-07-30T05:18:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/48753.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/48753.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/48753.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/48753.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.4k\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u6784\u5efa\u4e00\u4e2aSpring Cloud Eureka Server\u6ce8\u518c\u4e2d\u5fc3\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a\u5b98\u65b9\u6587\u6863\u53c2\u8003\u3001\u521b\u5efaSpring Boot\u9879\u76ee\uff08\u4f7f\u7528JDK21\u548cSpring Boot 3.5.3\uff09\u3001\u6dfb\u52a0Eureka Server\u4f9d\u8d56\u914d\u7f6e\u3001\u4ee5\u53ca\u5173\u952e\u7684YML\u914d\u7f6e\u8bbe\u7f6e\uff08\u5982\u7aef\u53e38761\u3001\u7981\u7528\u81ea\u6ce8\u518c\u7b49\uff09\u3002\u6587\u7ae0\u63d0\u4f9b\u4e86\u5355\u673a\u6a21\u5f0f\u548c\u9ad8\u53ef\u7528\u6a21\u5f0f\u7684\u914d\u7f6e\u793a\u4f8b\uff0c\u5e76\u5f3a\u8c03\u4e86\u5173\u952e\u914d\u7f6e\u9879\u5982registerWithEureka: false\u7684\u91cd\u8981\u6027\uff0c\u786e\u4fddEureka Server\u4f5c\u4e3a\u72ec\u7acb\u7684\u670d\u52a1\u6ce8\u518c\u4e2d\u5fc3\u6b63\u5e38\u8fd0\u884c\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/48753.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-30T05:18:07+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730051749-6889aafdba7f4.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/48753.html","url":"https:\/\/www.wsisp.com\/helps\/48753.html","name":"\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-30T05:18:07+00:00","dateModified":"2025-07-30T05:18:07+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/48753.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/48753.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/48753.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u53d1\u73b0\uff1aEureka \u670d\u52a1\u5668\uff08Service Discovery: Eureka Server\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/48753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=48753"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/48753\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/48743"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=48753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=48753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=48753"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=48753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}