Sunday, 30 April 2017

Spring Boot PostGre DataBase Setup

I tested to use a cloud Postgres database provided by Heroku from my Netbeans in the following database connection setup. However, it led to a connection failure.

I think the fault should be at the JDBC URL, which needs extra string to break down the https. Please ref. to how-to-connect-postgres-database


# DATA SOURCE
spring.datasource.url=jdbc:postgres://ixfctradvatvsx:s5d2njfvukfHWlzdmVDcETNUgx@ec2-54-83-56-177.compute-1.amazonaws.com:5432/dlbp7q8itvcdf
spring.datasource.username = ixfctradvatvsx
spring.datasource.password = s5d2njfvukfHWlzdmVDcETNUgx
spring.datasource.driver-class-name = org.postgresql.Driver

# JPA/HIBERNATE
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto = create-drop

spring.jpa.database-platform = org.hibernate.dialect.PostgreSQLDialect


No comments:

Can Jackson Deserialize Java Time ZonedDateTime

Yes, but must include JSR310. Thus ZonedDateTime can be deserialized directly from JSON response to POJO field. <dependency> <g...