Spring Boot Application deployed on Elastic Beanstalk Java environment returns 502

后端 未结 3 501
太阳男子
太阳男子 2021-01-04 01:52

I\'m trying to deploy a very simple Spring Boot application on AWS Elastic Beanstalk using AWS\'s Java configuration (not their Tomcat configuration), but I keep getting a 5

3条回答
  •  生来不讨喜
    2021-01-04 02:37

    If somebody is still getting such error, after setting server.port=5000. Here's what you can do if you got db connectivity:

    1. In configuration section of your dashboard, go to RDS section and create a remote db. Remember username, password of formed db.

    2. In Software section, add following properties:

    SPRING_DATASOURCE_URL=jdbc:mysql://(your-db-url)/ebdb

    SPRING_DATASOURCE_USERNAME=(username)

    SPRING_DATASOURCE_PASSWORD=(password)

    SPRING_JPA_HIBERNATE_DDL_AUTO=update

    SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.MySQL5Dialect

提交回复
热议问题