本文介绍: java spring cloud eureka 简单实验

1.概要

1.1 目标说明

注册中心是微服务管理服务的一个工具,这里以eureka为例先创建一个。目标就是让服务启动起来。

1.2 创建步骤

  • 创建一个主工程,选项eureka
  • 创建一个子工程,实现服务

1.2 知识要点

 

@SpringBootApplication
@EnableEurekaServer
public class Main {
    public static void main(String[] args) {
        SpringApplication.run(Main.class);
        System.out.println("Hello world!");
    }
}

2.代码

2.1 父工程

<?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.2.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.xjc.springcloundtest</groupId>
    <artifactId>demo8</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>demo8</name>
    <description>demo8</description>
    <modules>
        <module>untitled</module>
    </modules>
    <properties>
        <java.version>21</java.version>
        <spring-cloud.version>2023.0.0</spring-cloud.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
        </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.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

 2.2 子工程

 <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.xjc.springcloundtest</groupId>
        <artifactId>demo8</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>

    <artifactId>untitled</artifactId>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

</project>

2.3 配置文件

server:
  port: 10086
spring:
  application:
    name: eureka server
eureka:
  server:
    batch-replication: false

2.4 主函数

 

package com.xjc.springcloundtest;

import com.netflix.discovery.shared.Application;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

@SpringBootApplication
@EnableEurekaServer
public class Main {
    public static void main(String[] args) {
        SpringApplication.run(Main.class);
        System.out.println("Hello world!");
    }
}

3.实验结果

3.1 页面效果

3.2 控制台(控制台有个错误,这里先不管,只是最小成本的成功就可以了)

C:UsersThinkPad.jdksopenjdk-21.0.2binjava.exe -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:D:Program FilesJetBrainsIntelliJ IDEA 2023.3.2libidea_rt.jar=63122:D:Program FilesJetBrainsIntelliJ IDEA 2023.3.2bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath C:UsersThinkPadIdeaProjectsdemo8untitledtargetclasses;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-starter4.1.0spring-cloud-starter-4.1.0.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-starter3.2.2spring-boot-starter-3.2.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot3.2.2spring-boot-3.2.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-context6.1.3spring-context-6.1.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-aop6.1.3spring-aop-6.1.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-beans6.1.3spring-beans-6.1.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-expression6.1.3spring-expression-6.1.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-autoconfigure3.2.2spring-boot-autoconfigure-3.2.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-starter-logging3.2.2spring-boot-starter-logging-3.2.2.jar;C:UsersThinkPad.m2repositorychqoslogbacklogback-classic1.4.14logback-classic-1.4.14.jar;C:UsersThinkPad.m2repositorychqoslogbacklogback-core1.4.14logback-core-1.4.14.jar;C:UsersThinkPad.m2repositoryorgapachelogginglog4jlog4j-to-slf4j2.21.1log4j-to-slf4j-2.21.1.jar;C:UsersThinkPad.m2repositoryorgapachelogginglog4jlog4j-api2.21.1log4j-api-2.21.1.jar;C:UsersThinkPad.m2repositoryorgslf4jjul-to-slf4j2.0.11jul-to-slf4j-2.0.11.jar;C:UsersThinkPad.m2repositoryjakartaannotationjakarta.annotation-api2.1.1jakarta.annotation-api-2.1.1.jar;C:UsersThinkPad.m2repositoryorgyamlsnakeyaml2.2snakeyaml-2.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-context4.1.0spring-cloud-context-4.1.0.jar;C:UsersThinkPad.m2repositoryorgspringframeworksecurityspring-security-crypto6.2.1spring-security-crypto-6.2.1.jar;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-commons4.1.0spring-cloud-commons-4.1.0.jar;C:UsersThinkPad.m2repositoryorgspringframeworksecurityspring-security-rsa1.1.1spring-security-rsa-1.1.1.jar;C:UsersThinkPad.m2repositoryorgbouncycastlebcprov-jdk18on1.74bcprov-jdk18on-1.74.jar;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-starter-netflix-eureka-client4.1.0spring-cloud-starter-netflix-eureka-client-4.1.0.jar;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-netflix-eureka-client4.1.0spring-cloud-netflix-eureka-client-4.1.0.jar;C:UsersThinkPad.m2repositoryorgapachehttpcomponentsclient5httpclient55.2.3httpclient5-5.2.3.jar;C:UsersThinkPad.m2repositoryorgapachehttpcomponentscore5httpcore55.2.4httpcore5-5.2.4.jar;C:UsersThinkPad.m2repositoryorgapachehttpcomponentscore5httpcore5-h25.2.4httpcore5-h2-5.2.4.jar;C:UsersThinkPad.m2repositorycomnetflixeurekaeureka-client2.0.1eureka-client-2.0.1.jar;C:UsersThinkPad.m2repositorycomnetflixnetflix-commonsnetflix-eventbus.3.0netflix-eventbus-0.3.0.jar;C:UsersThinkPad.m2repositorycomnetflixnetflix-commonsnetflix-infix.3.0netflix-infix-0.3.0.jar;C:UsersThinkPad.m2repositorycommons-jxpathcommons-jxpath1.3commons-jxpath-1.3.jar;C:UsersThinkPad.m2repositoryjoda-timejoda-time2.3joda-time-2.3.jar;C:UsersThinkPad.m2repositoryorgantlrantlr-runtime3.4antlr-runtime-3.4.jar;C:UsersThinkPad.m2repositoryorgantlrstringtemplate3.2.1stringtemplate-3.2.1.jar;C:UsersThinkPad.m2repositoryantlrantlr2.7.7antlr-2.7.7.jar;C:UsersThinkPad.m2repositorycomgooglecodegsongson2.10.1gson-2.10.1.jar;C:UsersThinkPad.m2repositoryorgapachecommonscommons-math2.2commons-math-2.2.jar;C:UsersThinkPad.m2repositorycomthoughtworksxstreamxstream1.4.19xstream-1.4.19.jar;C:UsersThinkPad.m2repositoryiogithubx-streammxparser1.2.2mxparser-1.2.2.jar;C:UsersThinkPad.m2repositoryxmlpullxmlpull1.1.3.1xmlpull-1.1.3.1.jar;C:UsersThinkPad.m2repositoryjakartawsrsjakarta.ws.rs-api3.1.0jakarta.ws.rs-api-3.1.0.jar;C:UsersThinkPad.m2repositoryjakartainjectjakarta.inject-api2.0.1jakarta.inject-api-2.0.1.jar;C:UsersThinkPad.m2repositorycomnetflixservoservo-core.12.21servo-core-0.12.21.jar;C:UsersThinkPad.m2repositorycomgoogleguavaguava19.0guava-19.0.jar;C:UsersThinkPad.m2repositoryorgapachehttpcomponentshttpclient4.5.3httpclient-4.5.3.jar;C:UsersThinkPad.m2repositoryorgapachehttpcomponentshttpcore4.4.16httpcore-4.4.16.jar;C:UsersThinkPad.m2repositorycommons-codeccommons-codec1.16.0commons-codec-1.16.0.jar;C:UsersThinkPad.m2repositorycommons-configurationcommons-configuration1.10commons-configuration-1.10.jar;C:UsersThinkPad.m2repositorycommons-langcommons-lang2.6commons-lang-2.6.jar;C:UsersThinkPad.m2repositorycomfasterxmljacksoncorejackson-annotations2.15.3jackson-annotations-2.15.3.jar;C:UsersThinkPad.m2repositorycomfasterxmljacksoncorejackson-core2.15.3jackson-core-2.15.3.jar;C:UsersThinkPad.m2repositorycomfasterxmljacksoncorejackson-databind2.15.3jackson-databind-2.15.3.jar;C:UsersThinkPad.m2repositoryorgcodehausjettisonjettison1.4.0jettison-1.4.0.jar;C:UsersThinkPad.m2repositorycomnetflixeurekaeureka-core2.0.1eureka-core-2.0.1.jar;C:UsersThinkPad.m2repositorycomfasterxmlwoodstoxwoodstox-core6.2.1woodstox-core-6.2.1.jar;C:UsersThinkPad.m2repositoryorgcodehauswoodstoxstax2-api4.2.1stax2-api-4.2.1.jar;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-starter-loadbalancer4.1.0spring-cloud-starter-loadbalancer-4.1.0.jar;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-loadbalancer4.1.0spring-cloud-loadbalancer-4.1.0.jar;C:UsersThinkPad.m2repositoryioprojectreactorreactor-core3.6.2reactor-core-3.6.2.jar;C:UsersThinkPad.m2repositoryorgreactivestreamsreactive-streams1.0.4reactive-streams-1.0.4.jar;C:UsersThinkPad.m2repositoryioprojectreactoraddonsreactor-extra3.5.1reactor-extra-3.5.1.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-starter-cache3.2.2spring-boot-starter-cache-3.2.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-context-support6.1.3spring-context-support-6.1.3.jar;C:UsersThinkPad.m2repositorycomstoyanrevictor1.0.0evictor-1.0.0.jar;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-starter-netflix-eureka-server4.1.0spring-cloud-starter-netflix-eureka-server-4.1.0.jar;C:UsersThinkPad.m2repositoryorgspringframeworkcloudspring-cloud-netflix-eureka-server4.1.0spring-cloud-netflix-eureka-server-4.1.0.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-starter-web3.2.2spring-boot-starter-web-3.2.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-starter-json3.2.2spring-boot-starter-json-3.2.2.jar;C:UsersThinkPad.m2repositorycomfasterxmljacksondatatypejackson-datatype-jdk82.15.3jackson-datatype-jdk8-2.15.3.jar;C:UsersThinkPad.m2repositorycomfasterxmljacksondatatypejackson-datatype-jsr3102.15.3jackson-datatype-jsr310-2.15.3.jar;C:UsersThinkPad.m2repositorycomfasterxmljacksonmodulejackson-module-parameter-names2.15.3jackson-module-parameter-names-2.15.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-starter-tomcat3.2.2spring-boot-starter-tomcat-3.2.2.jar;C:UsersThinkPad.m2repositoryorgapachetomcatembedtomcat-embed-core10.1.18tomcat-embed-core-10.1.18.jar;C:UsersThinkPad.m2repositoryorgapachetomcatembedtomcat-embed-el10.1.18tomcat-embed-el-10.1.18.jar;C:UsersThinkPad.m2repositoryorgapachetomcatembedtomcat-embed-websocket10.1.18tomcat-embed-websocket-10.1.18.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-web6.1.3spring-web-6.1.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-webmvc6.1.3spring-webmvc-6.1.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-starter-actuator3.2.2spring-boot-starter-actuator-3.2.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-actuator-autoconfigure3.2.2spring-boot-actuator-autoconfigure-3.2.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-actuator3.2.2spring-boot-actuator-3.2.2.jar;C:UsersThinkPad.m2repositoryiomicrometermicrometer-observation1.12.2micrometer-observation-1.12.2.jar;C:UsersThinkPad.m2repositoryiomicrometermicrometer-commons1.12.2micrometer-commons-1.12.2.jar;C:UsersThinkPad.m2repositoryiomicrometermicrometer-jakarta91.12.2micrometer-jakarta9-1.12.2.jar;C:UsersThinkPad.m2repositoryiomicrometermicrometer-core1.12.2micrometer-core-1.12.2.jar;C:UsersThinkPad.m2repositoryorghdrhistogramHdrHistogram2.1.12HdrHistogram-2.1.12.jar;C:UsersThinkPad.m2repositoryorglatencyutilsLatencyUtils2.0.3LatencyUtils-2.0.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkbootspring-boot-starter-freemarker3.2.2spring-boot-starter-freemarker-3.2.2.jar;C:UsersThinkPad.m2repositoryorgfreemarkerfreemarker2.3.32freemarker-2.3.32.jar;C:UsersThinkPad.m2repositorycomnetflixeurekaeureka-client-jersey32.0.1eureka-client-jersey3-2.0.1.jar;C:UsersThinkPad.m2repositoryorgglassfishjerseyconnectorsjersey-apache-connector3.1.5jersey-apache-connector-3.1.5.jar;C:UsersThinkPad.m2repositorycomnetflixeurekaeureka-core-jersey32.0.1eureka-core-jersey3-2.0.1.jar;C:UsersThinkPad.m2repositoryorgglassfishjerseycontainersjersey-container-servlet3.1.5jersey-container-servlet-3.1.5.jar;C:UsersThinkPad.m2repositoryorgglassfishjerseycontainersjersey-container-servlet-core3.1.5jersey-container-servlet-core-3.1.5.jar;C:UsersThinkPad.m2repositoryorgglassfishjerseycorejersey-common3.1.5jersey-common-3.1.5.jar;C:UsersThinkPad.m2repositoryorgglassfishhk2osgi-resource-locator1.0.3osgi-resource-locator-1.0.3.jar;C:UsersThinkPad.m2repositoryorgglassfishjerseycorejersey-server3.1.5jersey-server-3.1.5.jar;C:UsersThinkPad.m2repositoryjakartavalidationjakarta.validation-api3.0.2jakarta.validation-api-3.0.2.jar;C:UsersThinkPad.m2repositoryorgglassfishjerseycorejersey-client3.1.5jersey-client-3.1.5.jar;C:UsersThinkPad.m2repositoryorgglassfishjerseyinjectjersey-hk23.1.5jersey-hk2-3.1.5.jar;C:UsersThinkPad.m2repositoryorgglassfishhk2hk2-locator3.0.5hk2-locator-3.0.5.jar;C:UsersThinkPad.m2repositoryorgglassfishhk2externalaopalliance-repackaged3.0.5aopalliance-repackaged-3.0.5.jar;C:UsersThinkPad.m2repositoryorgglassfishhk2hk2-utils3.0.5hk2-utils-3.0.5.jar;C:UsersThinkPad.m2repositoryorgjavassistjavassist3.29.2-GAjavassist-3.29.2-GA.jar;C:UsersThinkPad.m2repositoryorgglassfishhk2spring-bridge3.0.5spring-bridge-3.0.5.jar;C:UsersThinkPad.m2repositoryorgglassfishhk2hk2-api3.0.5hk2-api-3.0.5.jar;C:UsersThinkPad.m2repositorycomfasterxmljacksondataformatjackson-dataformat-xml2.15.3jackson-dataformat-xml-2.15.3.jar;C:UsersThinkPad.m2repositoryorgglassfishjaxbjaxb-runtime4.0.4jaxb-runtime-4.0.4.jar;C:UsersThinkPad.m2repositoryorgglassfishjaxbjaxb-core4.0.4jaxb-core-4.0.4.jar;C:UsersThinkPad.m2repositoryorgeclipseangusangus-activation2.0.1angus-activation-2.0.1.jar;C:UsersThinkPad.m2repositoryorgglassfishjaxbtxw24.0.4txw2-4.0.4.jar;C:UsersThinkPad.m2repositorycomsunistackistack-commons-runtime4.1.2istack-commons-runtime-4.1.2.jar;C:UsersThinkPad.m2repositoryorgslf4jslf4j-api2.0.11slf4j-api-2.0.11.jar;C:UsersThinkPad.m2repositoryjakartaxmlbindjakarta.xml.bind-api4.0.1jakarta.xml.bind-api-4.0.1.jar;C:UsersThinkPad.m2repositoryjakartaactivationjakarta.activation-api2.1.2jakarta.activation-api-2.1.2.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-core6.1.3spring-core-6.1.3.jar;C:UsersThinkPad.m2repositoryorgspringframeworkspring-jcl6.1.3spring-jcl-6.1.3.jar com.xjc.springcloundtest.Main

  .   ____          _            __ _ _
 /\ / ___'_ __ _ _(_)_ __  __ _    
( ( )___ | '_ | '_| | '_ / _` |    
 \/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |___, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.2.2)

2024-01-31T12:42:42.407+08:00  INFO 24464 --- [eureka server] [           main] com.xjc.springcloundtest.Main            : Starting Main using Java 21.0.2 with PID 24464 (C:UsersThinkPadIdeaProjectsdemo8untitledtargetclasses started by ThinkPad in C:UsersThinkPadIdeaProjectsdemo8)
2024-01-31T12:42:42.409+08:00  INFO 24464 --- [eureka server] [           main] com.xjc.springcloundtest.Main            : No active profile set, falling back to 1 default profile: "default"
2024-01-31T12:42:43.345+08:00  INFO 24464 --- [eureka server] [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=35f8264b-1807-3f5b-963b-26ea53f45c09
2024-01-31T12:42:43.391+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration$LoadBalancerInterceptorConfig' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration$LoadBalancerInterceptorConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). The currently created BeanPostProcessor [lbRestClientPostProcessor] is declared through a non-static factory method on that class; consider declaring it as static instead.
2024-01-31T12:42:43.393+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.loadbalancer.config.BlockingLoadBalancerClientAutoConfiguration' of type [org.springframework.cloud.loadbalancer.config.BlockingLoadBalancerClientAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.395+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.loadbalancer.config.LoadBalancerAutoConfiguration' of type [org.springframework.cloud.loadbalancer.config.LoadBalancerAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.400+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.commons.config.CommonsConfigAutoConfiguration' of type [org.springframework.cloud.commons.config.CommonsConfigAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.401+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.402+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'loadBalancerClientsDefaultsMappingsProvider' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration$$Lambda/0x000001ed8839f0a8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.402+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'defaultsBindHandlerAdvisor' of type [org.springframework.cloud.commons.config.DefaultsBindHandlerAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.408+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.cloud.loadbalancer-org.springframework.cloud.client.loadbalancer.LoadBalancerClientsProperties' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerClientsProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.414+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'default.org.springframework.cloud.loadbalancer.config.LoadBalancerAutoConfiguration.LoadBalancerClientSpecification' of type [org.springframework.cloud.loadbalancer.annotation.LoadBalancerClientSpecification] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.415+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'default.org.springframework.cloud.loadbalancer.config.BlockingLoadBalancerClientAutoConfiguration.LoadBalancerClientSpecification' of type [org.springframework.cloud.loadbalancer.annotation.LoadBalancerClientSpecification] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.415+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'default.org.springframework.cloud.netflix.eureka.loadbalancer.LoadBalancerEurekaAutoConfiguration.LoadBalancerClientSpecification' of type [org.springframework.cloud.loadbalancer.annotation.LoadBalancerClientSpecification] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.416+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'loadBalancerClientFactory' of type [org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.418+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'blockingLoadBalancerClient' of type [org.springframework.cloud.loadbalancer.blocking.client.BlockingLoadBalancerClient] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.425+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'loadBalancerServiceInstanceCookieTransformer' of type [org.springframework.cloud.loadbalancer.core.LoadBalancerServiceInstanceCookieTransformer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.426+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'xForwarderHeadersTransformer' of type [org.springframework.cloud.loadbalancer.blocking.XForwardedHeadersTransformer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.427+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.428+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'loadBalancerRequestFactory' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerRequestFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.429+08:00  WARN 24464 --- [eureka server] [           main] trationDelegate$BeanPostProcessorChecker : Bean 'loadBalancerInterceptor' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-31T12:42:43.622+08:00  INFO 24464 --- [eureka server] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 10086 (http)
2024-01-31T12:42:43.647+08:00  INFO 24464 --- [eureka server] [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-01-31T12:42:43.647+08:00  INFO 24464 --- [eureka server] [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.18]
2024-01-31T12:42:43.721+08:00  INFO 24464 --- [eureka server] [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-01-31T12:42:43.722+08:00  INFO 24464 --- [eureka server] [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1252 ms
2024-01-31T12:42:44.499+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2024-01-31T12:42:44.501+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2024-01-31T12:42:44.674+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2024-01-31T12:42:44.675+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2024-01-31T12:42:45.378+08:00  WARN 24464 --- [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'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.
2024-01-31T12:42:45.395+08:00  INFO 24464 --- [eureka server] [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2024-01-31T12:42:45.431+08:00  INFO 24464 --- [eureka server] [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2024-01-31T12:42:45.441+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2024-01-31T12:42:45.441+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2024-01-31T12:42:45.441+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2024-01-31T12:42:45.441+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2024-01-31T12:42:45.459+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2024-01-31T12:42:45.476+08:00  INFO 24464 --- [eureka server] [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2024-01-31T12:42:45.476+08:00  INFO 24464 --- [eureka server] [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2024-01-31T12:42:45.476+08:00  INFO 24464 --- [eureka server] [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2024-01-31T12:42:45.476+08:00  INFO 24464 --- [eureka server] [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2024-01-31T12:42:45.476+08:00  INFO 24464 --- [eureka server] [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2024-01-31T12:42:45.476+08:00  INFO 24464 --- [eureka server] [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2024-01-31T12:42:45.476+08:00  INFO 24464 --- [eureka server] [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2024-01-31T12:42:45.543+08:00  INFO 24464 --- [eureka server] [           main] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/}, exception=java.net.ConnectException: Connection refused: getsockopt stacktrace=jakarta.ws.rs.ProcessingException: java.net.ConnectException: Connection refused: getsockopt

原文地址:https://blog.csdn.net/xie__jin__cheng/article/details/135950970

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_63789.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注