SpringCloud Eureka Unable to start embedded Tomcat

 

问题:

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: 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=httpTraceFilter)}

Caused by: 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=httpTraceFilter)}

 

原因:可能是版本不一致导致的!!!

解决办法:

亲测改成这几个版本是可以正常启动的!!!!!



    org.springframework.cloud
    spring-cloud-dependencies
    Greenwich.SR3
    pom
    import




    org.springframework.boot
    spring-boot-dependencies
    2.1.4.RELEASE
    pom
    import
 


    org.springframework.cloud
    spring-cloud-starter-eureka-server
    1.4.6.RELEASE

 

 

你可能感兴趣的:(JAVA)