首页 > 解决方案 > 如何使用 prod 配置文件(Spring Boot)在 Elastic Beanstalk 上的端口 5000 上公开应用程序

问题描述

当我将应用程序部署到 Elastic Beanstalk 时,我希望应用程序在端口 5000 上公开。

这是我的 application.yaml 文件:

spring:
  config:
    activate:
      on-profile: prod

server:
  port: 5000

我在 EB 的环境变量中添加了 SPRING_PROFILES_ACTIVE 环境变量

在此处输入图像描述

但是,Health 仍处于 Severe 状态,所以我猜该应用程序仍在 8080 上暴露。任何想法我要去哪里。错误的?干杯

标签: springspring-bootamazon-elastic-beanstalk

解决方案


推荐阅读