当前位置: 首页 > 知识库问答 >
问题:

:无法启动web服务器;嵌套的异常是org。springframework。靴子网状物服务器WebServerException:无法启动嵌入式Tomcat

金英华
2023-03-14

说明:无法启动web服务器;嵌套的异常是org。springframework。靴子网状物服务器WebServerException:无法启动嵌入式Tomcat

启动Tomcat上下文时出错。例外情况:

组织。springframework。豆。工厂BeanCreationException。消息:创建在类路径资源[org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]中定义的名为“servletendpointregister”的bean时出错:通过工厂方法实例化bean失败;嵌套的异常是org。springframework。豆。BeanInstationException:未能实例化[org.springframework.boot.actuate.endpoint.web.ServletEndPointRegistrator]:工厂方法“ServletEndpointRegistrar”引发异常;嵌套的异常是org。springframework。豆。工厂未满足的DependencyException:创建名为“gatewayControllerEndpoint”的bean时出错,该bean在类路径资源[org/springframework/cloud/gateway/config/GatewayAutoConfiguration$GatewayActuatorConfiguration.class]:通过方法“gatewayControllerEndpoint”参数2表示未满足的依赖关系;嵌套的异常是org。springframework。豆。工厂未满足的DependencyException:创建名为“weightCalculatorWebFilter”的bean时出错,该bean在类路径资源[org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class]中定义:通过方法“weightCalculatorWebFilter”参数0表示未满足的依赖关系;嵌套的异常是org。springframework。豆。工厂未满足的依赖项异常:创建名为“gatewayConfigurationService”的bean时出错,该bean在类路径资源[org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class]中定义:通过方法“gatewayConfigurationService”参数1表示未满足的依赖项;嵌套的异常是org。springframework。豆。工厂NoSuchBeanDefinitionException:没有类型为“org”的符合条件的bean。springframework。果心转换ConversionService’available:至少需要1个符合autowire候选资格的bean。依赖项注释:{@org.springframework.beans.factory.annotation.Qualifier(value=“webFluxConversionService”)}

波姆。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-html" target="_blank">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();
    }

}

共有1个答案

卫景明
2023-03-14

尝试在ServiceApplication类中扩展SpringBootServletializer。

 类似资料:
  • AnnotationConfigServletWebServerApplicationContext,txid=,subtxnbr=,sid=,user=,bizpn=,cnsmr=,reqid=,cnsmr=,上下文初始化期间遇到异常-取消刷新尝试:org。springframework。上下文ApplicationContextException:无法启动web服务器;嵌套异常为org。spr

  • 运行Spring Boot应用程序时,嵌入式tomcat服务器无法启动。我刚刚在pom.xml中添加了所需的依赖项,并创建了一个简单的java POJO类。应用程序属性已经按照oracle数据库所需的jdbc配置以及Hibernate方言信息进行了设置。 执行mvn spring-boot:run时的控制台日志

  • Spring应用程序使用Maven只包含Spring Web依赖项,给出“无法启动嵌入式Tomcat服务”的错误。 相同的项目在其他计算机上运行,就像预期的那样。 null

  • 我刚刚开始使用microservices,我想创建一个简单的Eureka服务器来执行我的Serviceregistry。目前,我只想在localhost上运行服务器,稍后我想添加一个注册到其中的示例微服务。问题是,我在尝试启动Eureka服务器时出错。我在Eclipse中使用Spring和Maven在ubuntu vm中开发。 我的POM. xml如下所示: http://maven.apache

  • 我有一个ASP.NET MVC4解决方案。当我尝试使用Visual Studio2012打开它时,我遇到以下错误: Microsoft Visual Studio 为ASP.NET 4.5配置Web失败。您必须为ASP.NET4.5手动配置此站点,以便站点正确运行。在本地计算机上找不到服务器。确保已将本地IIS服务器配置为支持安全通信。 请建议。

  • 通过start.spring.io创建了一个Spring应用程序,我试图运行该应用程序,但出现错误: org.springframework.context.应用程序上下文异常:无法启动Web服务器;嵌套异常java.lang.IllegalStateExctive: Temp目录'C:\WINDOWS\TEMP'不存在org.springframework.boot.web.servlet.co