前言:这种错误出现的原因还有其他,比如说你在dao多添加一个注解类似的,少添加注解或者其他的,我这边就是Eureka启动出现得,跟其他没关系,为了就是让更少人翻跟头。
2019-04-27 13:36:00.057 INFO 14544 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@498d318c: startup date [Sat Apr 27 13:36:00 CST 2019]; root of context hierarchy
2019-04-27 13:36:00.394 INFO 14544 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-04-27 13:36:00.435 INFO 14544 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f110fcfe] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.3.RELEASE)
2019-04-27 13:36:00.857 INFO 14544 --- [ main] com.st.app.EureKaServer : No active profile set, falling back to default profiles: default
2019-04-27 13:36:00.870 INFO 14544 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4fce136b: startup date [Sat Apr 27 13:36:00 CST 2019]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@498d318c
2019-04-27 13:36:01.433 INFO 14544 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2019-04-27 13:36:01.665 INFO 14544 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=ca0ffc6f-9ce9-3ed6-a0ce-99d8d7ae4b88
2019-04-27 13:36:01.677 INFO 14544 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-04-27 13:36:01.780 INFO 14544 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f110fcfe] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-27 13:36:02.068 INFO 14544 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8761 (http)
2019-04-27 13:36:02.078 INFO 14544 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2019-04-27 13:36:02.079 INFO 14544 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.14
2019-04-27 13:36:02.212 INFO 14544 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-04-27 13:36:02.213 INFO 14544 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1343 ms
2019-04-27 13:36:02.596 ERROR 14544 --- [ost-startStop-1] o.s.b.c.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'traceFilterRegistration' defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Unsatisfied dependency expressed through method 'traceFilterRegistration' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.servlet.Filter' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=webRequestLoggingFilter)}
2019-04-27 13:36:02.624 WARN 14544 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
2019-04-27 13:36:02.750 ERROR 14544 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of method traceFilterRegistration in org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration required a bean of type 'javax.servlet.Filter' that could not be found.
Action:
Consider defining a bean of type 'javax.servlet.Filter' in your configuration.
错误的原因以及解决方案:
具体原因我也不太清楚,我就是给我的仓库全部删除了,然后重新下载一遍就可以了