【发布时间】:2020-09-12 12:14:54
【问题描述】:
我有一个名为“BikeService”的 Spring Boot 项目。我正在使用 pom.xml 文件中的以下命令为这个项目生成一个 war 文件
<packaging>war</packaging>
现在我想将它部署在我使用
创建的 Elastic Beanstalk 上Tomcat 8.5 with Java 8 running on 64bit Amazon Linux/3.3.6
上传代码后,部署成功,环境运行状况良好,但在运行环境 URL 时显示 HTTP 404 - Not Found。
我正在使用以下 buildspec.yml 文件:
version: 0.2
phases:
install:
runtime-versions:
java: corretto11
pre_build:
commands:
- echo In the pre_build phase...
build:
commands:
- echo Build started on `date`
- mvn install
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- target/bike-service-0.0.1-SNAPSHOT.war
- scripts/*
【问题讨论】:
-
当您登录您的 EB 实例并从内部
curl您的应用程序时,它是否在您想要的端口上按预期工作?
标签: java spring amazon-web-services spring-boot amazon-elastic-beanstalk