• 【spring Cloud】为啥最后报空指针了?Eureka注册Movie对象不成功?


    关注 码龄 粉丝数 原力等级 -- 被采纳 被点赞 采纳率 莉芙·莫妮卡 2024-03-24 21:28 采纳率: 36.4% 浏览 2 首页/ 编程语言 / 【spring Cloud】为啥最后报空指针了?Eureka注册Movie对象不成功? javaspringspring cloud . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ [32m :: Spring Boot :: [39m [2m (v3.2.4)[0;39m [2m2024-03-24T21:15:35.676+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mf.touhou.movie.ProviderMovieApplication [0;39m [2m:[0;39m Starting ProviderMovieApplication using Java 17.0.5 with PID 402444 (I:\programation\Java\eclipse projects\SpringCloudProject\provider-movie\target\classes started by Administrator in I:\programation\Java\eclipse projects\SpringCloudProject\provider-movie) [2m2024-03-24T21:15:35.678+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mf.touhou.movie.ProviderMovieApplication [0;39m [2m:[0;39m No active profile set, falling back to 1 default profile: "default" [2m2024-03-24T21:15:36.610+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.s.cloud.context.scope.GenericScope [0;39m [2m:[0;39m BeanFactory id=c4ef0a57-a877-37f6-ae12-46b53c41e96f [2m2024-03-24T21:15:36.655+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.658+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.659+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.665+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.668+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.669+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m Bean 'loadBalancerClientsDefaultsMappingsProvider' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration$$Lambda$536/0x0000000800f952e0] 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. [2m2024-03-24T21:15:36.670+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.676+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.682+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.683+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.684+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.685+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.688+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.696+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.697+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.697+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.698+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.699+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:36.900+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m:[0;39m Tomcat initialized with port 8001 (http) [2m2024-03-24T21:15:36.923+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.apache.catalina.core.StandardService [0;39m [2m:[0;39m Starting service [Tomcat] [2m2024-03-24T21:15:36.923+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.apache.catalina.core.StandardEngine [0;39m [2m:[0;39m Starting Servlet engine: [Apache Tomcat/10.1.19] [2m2024-03-24T21:15:37.025+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.a.c.c.C.[Tomcat].[localhost].[/] [0;39m [2m:[0;39m Initializing Spring embedded WebApplicationContext [2m2024-03-24T21:15:37.025+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mw.s.c.ServletWebServerApplicationContext[0;39m [2m:[0;39m Root WebApplicationContext: initialization completed in 1307 ms Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts [2m2024-03-24T21:15:38.408+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36miguration$LoadBalancerCaffeineWarnLogger[0;39m [2m:[0;39m 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. [2m2024-03-24T21:15:38.414+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.s.b.a.e.web.EndpointLinksResolver [0;39m [2m:[0;39m Exposing 1 endpoint(s) beneath base path '/actuator' [2m2024-03-24T21:15:38.474+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.s.c.n.eureka.InstanceInfoFactory [0;39m [2m:[0;39m Setting initial instance status as: STARTING [2m2024-03-24T21:15:38.476+08:00[0;39m [31mERROR[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.s.c.n.e.s.EurekaRegistration [0;39m [2m:[0;39m error getting CloudEurekaClient org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scopedTarget.eurekaClient' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Unsatisfied dependency expressed through method 'eurekaClient' parameter 3: No qualifying bean of type 'com.netflix.discovery.shared.transport.jersey.TransportClientFactories' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:802) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:546) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1166) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:364) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:375) ~[spring-cloud-context-4.1.0.jar:4.1.0] at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:179) ~[spring-cloud-context-4.1.0.jar:4.1.0] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:361) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-6.1.1.jar:6.1.1] at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration.getTargetObject(EurekaRegistration.java:128) ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration.getEurekaClient(EurekaRegistration.java:116) ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:281) ~[spring-core-6.1.1.jar:6.1.1] at org.springframework.cloud.context.scope.GenericScope$LockedScopedProxyFactoryBean.invoke(GenericScope.java:482) ~[spring-cloud-context-4.1.0.jar:4.1.0] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.1.jar:6.1.1] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765) ~[spring-aop-6.1.1.jar:6.1.1] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:717) ~[spring-aop-6.1.1.jar:6.1.1] at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration$$SpringCGLIB$$0.getEurekaClient() ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.maybeInitializeClient(EurekaServiceRegistry.java:54) ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.register(EurekaServiceRegistry.java:38) ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration.start(EurekaAutoServiceRegistration.java:83) ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:284) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:467) ~[spring-context-6.1.1.jar:6.1.1] at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na] at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:256) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:201) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:965) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:619) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.4.jar:3.2.4] at fuz.touhou.movie.ProviderMovieApplication.main(ProviderMovieApplication.java:12) ~[classes/:na] Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.netflix.discovery.shared.transport.jersey.TransportClientFactories' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1878) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1404) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-6.1.1.jar:6.1.1] ... 40 common frames omitted [2m2024-03-24T21:15:38.482+08:00[0;39m [33m WARN[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mConfigServletWebServerApplicationContext[0;39m [2m:[0;39m Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'eurekaAutoServiceRegistration' [2m2024-03-24T21:15:38.512+08:00[0;39m [32m INFO[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36m.s.b.a.l.ConditionEvaluationReportLogger[0;39m [2m:[0;39m Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. [2m2024-03-24T21:15:38.527+08:00[0;39m [31mERROR[0;39m [35m402444[0;39m [2m---[0;39m [2m[provider-movie] [ main][0;39m [2m[0;39m[36mo.s.boot.SpringApplication [0;39m [2m:[0;39m Application run failed org.springframework.context.ApplicationContextException: Failed to start bean 'eurekaAutoServiceRegistration' at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:287) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:467) ~[spring-context-6.1.1.jar:6.1.1] at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na] at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:256) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:201) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:965) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:619) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.4.jar:3.2.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.4.jar:3.2.4] at fuz.touhou.movie.ProviderMovieApplication.main(ProviderMovieApplication.java:12) ~[classes/:na] Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.cloud.netflix.eureka.CloudEurekaClient.getApplications()" because the return value of "org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration.getEurekaClient()" is null at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.maybeInitializeClient(EurekaServiceRegistry.java:54) ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.register(EurekaServiceRegistry.java:38) ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration.start(EurekaAutoServiceRegistration.java:83) ~[spring-cloud-netflix-eureka-client-4.1.0.jar:4.1.0] at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:284) ~[spring-context-6.1.1.jar:6.1.1] ... 13 common frames omitted server: port: 8000 spring: application: name: Eureka-Server eureka: instance: hostname: localhost #初始化主机名称 client: register-with-eureka: false #这个EurekaServer注册到其他的EurekaServer fetch-registry: false #不需要从其他的注册中心拉取数据 service-url: defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka #eureka server注册访问地址 server: port: 8001 spring: application: name: provider-movie eureka: instance: prefer-ip-address: true #采用服务提供方的实际IP地址注册 client: service-url: defaultZone: http://localhost:8000/eureka 展开全部 收起 写回答 好问题 0 提建议 追加酬金 关注问题 微信扫一扫 点击复制链接 分享 邀请回答 编辑 收藏 删除 结题 收藏 举报 追加酬金 (90%的用户在追加酬金后获得了解决方案) 当前问题酬金 ¥ 0 (可追加 ¥500) ¥ 15¥ 20¥ 50¥ 100¥ 200 支付方式 扫码支付 二维码出错 点击刷新 支付金额 15 元 提供问题酬金的用户不参与问题酬金结算和分配 支付即为同意 《付费问题酬金结算规则》 结题 再想想 删除 再等等

    4条回答 默认 最新

    • 檀越剑指大厂 Java领域优质创作者 2024-03-24 21:28
      关注

      莉芙·莫妮卡 晚上好🌙🌙🌙
      本答案参考ChatGPT-3.5

      根据提供的日志信息,我们无法确定具体的空指针异常出现在哪一段代码。但是,我们可以根据日志中提供的警告信息来推断可能的问题。以下是一些可以考虑的解决方案:

      1. 检查是否在使用Eureka注册Movie对象之前正确初始化了Eureka服务注册中心。 确保Eureka服务注册中心已正确配置并正在运行。您可以通过检查Eureka服务器的日志文件或通过访问Eureka服务器的健康端点来验证其状态。

      2. 确保正确配置了Eureka客户端。 在Spring Cloud项目中使用Eureka作为服务注册和发现的核心组件,您需要正确配置Eureka客户端。确保在应用程序的配置文件中提供正确的Eureka服务器URL和相关配置。

      3. 检查Movie对象的初始化和注册代码。 确保Movie对象已正确初始化,并且使用正确的Eureka客户端进行注册。确保在应用程序启动时执行注册代码,并在注册之前确保Movie对象已正确初始化。

      4. 检查依赖版本和兼容性。 确保您的Spring Cloud、Spring Boot和相关依赖项的版本兼容,并且没有冲突或不匹配的依赖关系。

      请确认您是否已经按照上述步骤进行了检查和调试,并提供更多的信息和代码以帮助我们更好地理解问题所在。

      评论
    • 码农阿豪 Java领域优质创作者 2024-03-24 21:28
      关注
      让阿豪来帮你解答,本回答参考chatgpt3.5编写提供,如果还有疑问可以评论或留言
      这段文本是什么?它的作用是什么?其中包含哪些信息? 这段文本是Spring Boot应用程序的启动日志,它记录了程序在启动过程中的一些关键信息,包括应用程序的版本、应用程序的启动时间、应用程序使用的Java版本、应用程序的PID等。此外,这段文本还提供了一些警告信息和错误提示,例如有些Bean没有被所有的BeanPostProcessor处理,或者某个Bean不符合一些要求。 这段文本包含了以下信息:
      • Spring Boot应用程序的版本是2.4.3。
      • 应用程序使用的Java版本是17.0.5。
      • 应用程序的启动时间是2024年3月24日21:15:35.678+08:00。
      • 应用程序的PID是402444。
      • 应用程序没有设置任何活动的配置文件,将使用默认配置文件。
      • Spring Cloud中的一些组件正在被加载和初始化。
      • 一些Bean没有被所有的BeanPostProcessor处理。
      • 一些Bean没有符合特定的要求。 以下是这段文本的示例代码:
      2024-03-24T21:15:35.676+08:00 :: Spring Boot :: (v3.2.4)[0;39m
      [2m2024-03-24T21:15:35.678+08:00 [INFO ] [provider-movie] [main] [f.touhou.movie.ProviderMovieApplication ] : Starting ProviderMovieApplication using Java 17.0.5 with PID 402444 (I:\programation\Java\eclipse projects\SpringCloudProject\provider-movie\target\classes started by Administrator in I:\programation\Java\eclipse projects\SpringCloudProject\provider-movie)
      [2m2024-03-24T21:15:35.678+08:00 [INFO ] [provider-movie] [main] [f.touhou.movie.ProviderMovieApplication ] : No active profile set, falling back to default profile: "default"
      [2m2024-03-24T21:15:36.610+08:00 [INFO ] [provider-movie] [main] [o.s.cloud.context.scope.GenericScope ] : BeanFactory id=c4ef0a57-a877-37f6-ae12-46b53c41e96f
      [33m2024-03-24T21:15:36.655+08:00 [WARN ] [provider-movie] [main] [o.s.cloud.loadbalancer.config.LoadBalancerAutoConfiguration$LoadBalancerInterceptorConfig] : 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.
      [33m2024-03-24T21:15:36.658+08:00 [WARN ] [provider-movie] [main] [o.s.cloud.context.config.LoadBalancerAutoConfiguration] : 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.
      [33m2024-03-24T21:15:36.659+08:00 [WARN ] [provider-movie] [main] [o.s.cloud.context.config.LoadBalancerAutoConfiguration] : 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.
      
      评论
    • CSDN-Ada助手 CSDN-AI 官方账号 2024-03-26 03:25
      关注

      【相关推荐】



      • 这篇博客: Spring Cloud——超详细讲解Eureka服务注册中心中的 一、什么是服务注册? 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:

        (1)在服务治理框架中,通常都会构建一个注册中心每个服务单元向注册中心登记自己提供的服务,包括服务的主机与端口号、服务版本号、通讯协议等一些附加信息。

        (2)注册中心按照服务名分类组织服务清单,同时还需要以心跳检测的方式去监测清单中的服务是否可用,若不可用需要从服务清单中剔除,以达到排除故障服务的效果。


      如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^
      评论
    • GISer Liu 2024-03-29 21:03
      关注

      该回答引用自GPT-3.5,由博主GISer Liu编写:

      根据您提供的信息,您遇到了一个Spring
      Cloud的问题,具体是关于Eureka注册Movie对象不成功并最终报空指针异常的情况。下面是我对这个问题的解决思路和解决方案:

      1. 分析问题: 首先需要分析为什么Eureka注册Movie对象不成功,并最终导致空指针异常。可能的原因包括:对象未正确初始化、Eureka配置错误、网络问题等。
      2. 检查对象初始化: 确保Movie对象正确初始化并且属性值正确设置。可以通过在日志中打印对象的属性值来验证。
      3. 检查Eureka配置: 确保Eureka配置正确,包括Eureka服务的地址、应用程序名称等。
      4. 网络连接问题: 检查网络连接是否正常,确保能够连接到Eureka服务。
      5. 日志分析: 仔细分析日志,查找空指针异常的具体原因。可能是因为某个对象为空引起的,需要定位到具体的代码位置。
      6. 解决方案: 根据分析结果,逐步解决问题。可能需要调整对象初始化逻辑、修复Eureka配置错误、处理网络连接问题等。
        如果您能提供更多的代码和日志信息,我可以帮助您更详细地分析和解决这个问题。

      如果该回答解决了您的问题,请采纳!如果没有,请参考以下方案进行修订

      用户答题指南

      评论
    编辑
    预览

    报告相同问题?

  • 相关阅读:
    Log4j2 配置日志记录发送到 kafka 中
    python web 开发与 Node.js + Express 创建web服务器入门
    Linux下对PC/SC智能卡接口编程
    iOS17.4获取UDID安装mobileconfig描述文件失败 提示“安全延迟进行中”问题 | 失窃设备保护
    8000字让你知道NoSQL是什么
    vue项目electron打包
    设计模式:享元模式
    【C++】多态 ① ( 类型兼容性原则与函数重写 | “ 多态 “ 引入 | 函数重写 )
    C++运算符重载
    DSP/BIOS的基本介绍
  • 原文地址:https://ask.csdn.net/questions/8078353