Very slow Spring Boot application startup

后端 未结 8 1630

I have a simple Spring Boot application that connects to a PostgreSQL database and serves as a JSON service. Somehow the startup has become very slow, see timings 10:37:10 a

8条回答
  •  一向
    一向 (楼主)
    2020-12-23 10:17

    When I point to database in AWS RDS server it takes 78 seconds. After given this configuration it takes 52 seconds.

    spring:
      jpa:
        properties:
          hibernate:
            temp:
              use_jdbc_metadata_defaults: false
    

    And after given this configuration with the above configuration it takes only 10 seconds.

    spring:
      jpa:
        hibernate:
          ddl-auto: none
    

提交回复
热议问题