Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
titlePostgreSQL
blueriq:
   <service>:
    datasource:
      <datasource-name>:
        url: jdbc:postgresql://<host>:<port>/<database>
        username: <username>
        password: <password>
        driver-class-name: org.postgresql.Driver
        validation-query: SELECT 1
        testWhileIdle: true
        timeBetweenEvictionRunsMillis: 5000
 
hibernate:
  dialect: org.hibernate.dialect.PostgreSQLDialect
  hbm2ddl:
    auto: validate
  id:
    new_generator_mappings: true
  show_sql: false
  use_nationalized_character_data: true

Database query timeout

To specify the database query timeout, set the defaultQueryTimeoutSeconds property in the datasource configuration.

If multi-tenancy enabled, when needed, the value has to be set for each datasource separately.

Without setting property, the default value is 60 seconds.

Code Block
blueriq:
  <service>:
    datasource:
      <datasource-name>:
        ...
        defaultQueryTimeoutSeconds: 10


Info

For additional datasource configuration please refer to the Spring property documentation.

Database drivers

Depending on the underlying database, a specific driver needs to be installed on the application server as described on Configuring JDBC database drivers.