简体   繁体   English

: 无法启动 web 服务器; 嵌套异常是 org.springframework.boot.web.server.WebServerException:无法启动嵌入式 Tomcat

[英]: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

Description: Unable to start web server;说明:无法启动web服务器; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat嵌套异常是 org.springframework.boot.web.server.WebServerException:无法启动嵌入式 Tomcat

Error starting Tomcat context.启动 Tomcat 上下文时出错。 Exception:例外:

org.springframework.beans.factory.BeanCreationException. org.springframework.beans.factory.BeanCreationException。 Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed;消息:在 class 路径资源 [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class] 中定义名称为 'servletEndpointRegistrar' 的 bean 创建错误:通过工厂方法进行 Bean 实例化失败; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]:工厂方法“servletEndpointRegistrar”抛出异常; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayControllerEndpoint' defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration$GatewayActuatorConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayControllerEndpoint' parameter 2;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException:在 class 路径资源 [org/springframework/cloud/gateway/config/GatewayAutoConfiguration$GatewayActuatorConfiguration.class] 中定义的名称为“gatewayControllerEndpoint”的 bean 创建时出错:通过方法表示的不满足依赖项' gatewayControllerEndpoint'参数2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'weightCalculatorWebFilter' defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class]: Unsatisfied dependency expressed through method 'weightCalculatorWebFilter' parameter 0;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException:在 class 路径资源 [org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class] 中定义的名称为“weightCalculatorWebFilter”创建 bean 时出错:通过方法“weightCalculatorWebFilter”表示不满足的依赖关系参数0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayConfigurationService' defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayConfigurationService' parameter 1;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException:在 class 路径资源 [org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class] 中定义名称为“gatewayConfigurationService”的 bean 创建时出错:通过方法“gatewayConfigurationService”表示不满足的依赖关系参数1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.convert.ConversionService' available: expected at least 1 bean which qualifies as autowire candidate.嵌套异常是 org.springframework.beans.factory.NoSuchBeanDefinitionException:没有“org.springframework.core.convert.ConversionService”类型的合格 bean 可用:预计至少有 1 个有资格作为自动装配候选者的 bean。 Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value="webFluxConversionService")}依赖注解:{@org.springframework.beans.factory.annotation.Qualifier(value="webFluxConversionService")}

POM.xml: POM.xml:

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.9.2</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.9.2</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-openfeign</artifactId>
        <version>2.2.1.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.amqp</groupId>
        <artifactId>spring-amqp</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt-api</artifactId>
        <version>0.10.5</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-mail</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-amqp</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.qpid</groupId>
        <artifactId>qpid-broker-core</artifactId>
        <version>7.1.2</version>
        <scope>test</scope>
    </dependency>
    <!-- AMQP protocol support is modular. Here we show support for 0-8/0-9. -->
    <dependency>
        <groupId>org.apache.qpid</groupId>
        <artifactId>qpid-broker-plugins-amqp-0-8-protocol</artifactId>
        <version>7.1.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.qpid</groupId>
        <artifactId>qpid-broker-plugins-memory-store</artifactId>
        <version>7.1.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-circuitbreaker-reactor-resilience4j</artifactId>
    </dependency>
    <dependency>
        <groupId>io.github.resilience4j</groupId>
        <artifactId>resilience4j-spring-boot2</artifactId>
        <version>1.1.0</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt-impl</artifactId>
        <version>0.10.5</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt-jackson</artifactId>
        <version>0.10.5</version>
        <scope>runtime</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-webflux</artifactId>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>5.3.6.Final</version>
    </dependency>

    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.3.0</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-gateway</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
    </dependency>
</dependencies>
@SpringBootApplication
public class ServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServiceApplication.class, args);
    }

    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }

    @Bean
    public ServerCodecConfigurer serverCodecConfigurer() {
        return ServerCodecConfigurer.create();
    }

}

Try to extends SpringBootServletInitializer in ServiceApplication class.尝试在 ServiceApplication class 中扩展SpringBootServletInitializer

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法启动Web服务器; 嵌套的异常是org.springframework.boot.web.server.WebServerException:无法启动嵌入式Tomcat - Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat Spring Boot:WebServerException:无法启动嵌入式 Tomcat - Spring Boot: WebServerException: Unable to start embedded Tomcat WebServerException:无法启动嵌入式 Tomcat - WebServerException: Unable to start embedded Tomcat 无法启动 bean 'webServerStartStop'; 无法启动嵌入式 Tomcat 服务器 - spring-boot-starter-web - Failed to start bean 'webServerStartStop'; Unable to start embedded Tomcat server - spring-boot-starter-web Spring 安全性 + SAML 2.0 配置 --> WebServerException:无法启动嵌入式 Tomcat - Spring Security + SAML 2.0 Configuration --> WebServerException: Unable to start embedded Tomcat 抛出WebServerException: Unable to start embedded Tomcat using Powermock and Springboot - Throw WebServerException: Unable to start embedded Tomcat using Powermock and Springboot 无法启动网络服务器; 嵌套异常是 java.lang.IllegalStateException - Unable to start web server; nested exception is java.lang.IllegalStateException 无法启动嵌入式 Tomcat org.springframework.context.ApplicationContextException - Unable to start embedded Tomcat org.springframework.context.ApplicationContextException 无法启动 web 服务器; 由于缺少 ServletWebServerFactory bean,嵌套异常是无法启动 ServletWebServerApplicationContext - Unable to start web server; nested exception is Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean 无法启动Tomcat 7服务器错误org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException - Unable to start Tomcat 7 Server error org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM