春季启动:无法启动嵌入式Tomcat servlet容器

阿马尔:

我是新来的春天引导和错误有在运行我的应用程序。我下面的教程,我相信我有正确的父母的依赖与POM,请帮帮我

主类:

package com.boot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Hello world!
 *
 */

@SpringBootApplication
public class App 
{
    public static void main( String[] args )
    {
        SpringApplication.run(App.class, "hello");
    }
}

错误的是:

   org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat servlet container
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:165) ~[spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:293) ~[spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) ~[spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:764) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:357) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:305) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1124) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1113) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at com.boot.App.main(App.java:18) [classes/:na]Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:159) ~[spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        ... 10 common frames omitted

POM:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>

  <groupId>com.boot</groupId>
  <artifactId>das-boot</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.3.1.RELEASE</version>
    </parent>
  <name>das-boot</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
  <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
  </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
阿齐兹:

尝试在端口号改变application.yaml(或application.properties)别的东西。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

春季启动Tomcat的配置,从容器迁移到嵌入式

Spring框架无法启动嵌入式容器

当所有报表服务都部署在 AWS FARGATE ECS 容器上时,无法启动嵌入式 Tomcat

嵌入式Tomcat 8-错误{org.apache.catalina.core.ContainerBase}-子容器在启动期间失败

在Servlet容器端口上运行嵌入式activemq代理

以编程方式获取嵌入式Servlet容器信息

没有嵌入式Servlet容器的Spring Boot

无法启动嵌入式容器;嵌套的异常是java.lang.NoClassDefFoundError:java / nio / charset / StandardCharsets

春季启动嵌入式的tomcat +访问日志与认证用户

嵌入式Servlet容器在Spring Boot中无法处理META-INF /资源

春季启动嵌入式卡夫卡无法连接

SpringBoot - 无法启动嵌入容器

我们是否可以避免Spring Boot应用程序重新启动来刷新与其嵌入式tomcat容器关联的证书?

Spring Boot:WebServerException:无法启动嵌入式Tomcat

无法启动嵌入式Tomcat NoClassDefFoundError DispatcherServletPath

运行 Eureka Server 时无法启动嵌入式 Tomcat

排除了自动配置,但仍在使用嵌入式servlet容器

将Jetty嵌入为Servlet容器

Tomcat嵌入式启动错误

重新启动嵌入式tomcat

春季启动 - 无需嵌入式tomcat的REST调用客户端

春季启动2.1嵌入式的Tomcat - 库密码是不正确的

春季启动-嵌入式Tomcat HTTP到HTTPS重定向

YouTube嵌入式视频无法启动

Arquillian无法为Websphere嵌入式容器加载LoadableExtension

春季启动Artemis嵌入式经纪人行为

Log4j2 JSP Taglib在Spring-boot嵌入式Servlet容器中不起作用

独立 Servlet 5 容器中的 JAX-RS (Jersey) API 无法启动

当部署到Tomcat但随着嵌入式服务器的工作原理春季启动应用程序提供了404