502 bad request on AWS Spring boot application

前端 未结 2 1153
没有蜡笔的小新
没有蜡笔的小新 2021-01-14 10:43

Hi I am new AWS and trying to deploy spring boot application in Elastic Beanstalk . Deployment is successful but not able to access application .Getting 502 Bad Request Gate

2条回答
  •  [愿得一人]
    2021-01-14 11:19

    From AWS documentation:

    By default, Spring Boot applications will listen on port 8080. Elastic Beanstalk assumes that the application will listen on port 5000. There are two ways to fix this discrepancy: change the port Elastic Beanstalk is configured to use, or change the port the Spring Boot application listens on.

    You can set the port in server.port property in application.properties or set it through environment as described in the document referred above by setting SERVER_PORT environment property.

提交回复
热议问题