未能将 spring-boot war 部署到 Elastic Beanstalk



我在将WAR文件部署到弹性豆茎(Tomcat(时遇到问题。我已经下载了日志,但收到一堆错误 https://pastebin.com/bVTjLJDD

我成功地测试了这个WAR文件,在我的PC上本地部署了Apache Tomcat,所以我不知道是什么导致了这些错误。

我的绒球.xml :

<?xml version="1.0" encoding="UTF-8"?>
<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>io.johnnathan.springboot</groupId>
<artifactId>product-store</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>product-store</name>
<description>Product storefront using Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>4.1.3</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.12</version><!--$NO-MVN-MAN-VER$-->
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.0.8.RELEASE</version><!--$NO-MVN-MAN-VER$-->
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>   
</plugin>
</plugins>
</build>
</project>

我已经在主类中扩展了 SpringBootServletInitializer。如pom所示.xml我还为雄猫依赖项设置了标签。在本地Apache Tomcat服务器上进行测试时,一切正常。这里可能有什么问题?

由以下原因引起:org.springframework.beans.factory.BeanCreation异常:创建在类路径资源 [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class] 中定义名称为"defaultValidator"的 bean 时出错:调用 init 方法失败;嵌套异常是 java.lang.NoClassDefFoundError:无法初始化类 org.hibernate.validator.internal.engine.valueextraction.ValueExtractorManager

可能是因为这个,战争没有部署。

确保在制作 WAR 时所有库都已就绪。

请检查库仅用于编译或其他内容。

相关内容

  • 没有找到相关文章

最新更新