For Spring Boot you can set this in your application.properties file:
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
I also found that I needed to set another property or I would get the error "org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set". To rectify that I set this property:
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
This reduced our startup time from about 100 seconds down to 12.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…