org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.slp.eurekaserver.EurekaServerApplication]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.cloud.netflix.eureka.server.EurekaServerConfiguration
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:) ~[spring-boot-1.3..RELEASE.jar:1.3..RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:) [spring-boot-1.3..RELEASE.jar:1.3..RELEASE]
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:) [spring-boot-1.3..RELEASE.jar:1.3..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-1.3..RELEASE.jar:1.3..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-1.3..RELEASE.jar:1.3..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-1.3..RELEASE.jar:1.3..RELEASE]
at com.slp.eurekaserver.EurekaServerApplication.main(EurekaServerApplication.java:) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:) ~[na:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:) ~[na:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:) ~[na:1.8.0_121]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:) [idea_rt.jar:na]
Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.cloud.netflix.eureka.server.EurekaServerConfiguration
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:) ~[spring-core-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:) ~[spring-context-4.2..RELEASE.jar:4.2..RELEASE]
... common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/web/servlet/FilterRegistrationBean
at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_121]
at java.lang.Class.privateGetDeclaredMethods(Class.java:) ~[na:1.8.0_121]
at java.lang.Class.getDeclaredMethods(Class.java:) ~[na:1.8.0_121]
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:) ~[spring-core-4.2..RELEASE.jar:4.2..RELEASE]
... common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.web.servlet.FilterRegistrationBean
at java.net.URLClassLoader.findClass(URLClassLoader.java:) ~[na:1.8.0_121]
at java.lang.ClassLoader.loadClass(ClassLoader.java:) ~[na:1.8.0_121]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:) ~[na:1.8.0_121]
at java.lang.ClassLoader.loadClass(ClassLoader.java:) ~[na:1.8.0_121]
... common frames omitted
原因:spring-cloud和spring-boot版本不一致
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect
原因:将自己注册自己到Eureka Server 和是否从Eureka Server上获取注册信息设置为false