外部JPA连接 - 春季启动



我有一个带有两个数据库的应用程序。

Mongo的主要

与Postgres之一的连接。

在生产中

当我部署它时,如果它正确连接到Postgres的数据库,但是当它发生一点时,稍微失去了连接而不再恢复它。

我应该播放哪些参数以不关闭连接?

spring:
devtools:
    restart:
        enabled: false
    livereload:
        enabled: false
data:
    mongodb:
        uri: mongodb://xxxxx:27017
        database: xxx
datasources:    
    elser:
        driver-class-name: org.postgresql.Driver
        url: jdbc:postgresql://222.21.224.337:5432/xxx
        username: username
        password: password
mail:
    host: localhost
    port: 25
    username:
    password:
thymeleaf:
    cache: true
jpa:
    show-sql: true
    database-platform: io.github.jhipster.domain.util.FixedPostgreSQL82Dialect
    database: POSTGRESQL
    properties:
        hibernate.id.new_generator_mappings: true
        hibernate.cache.use_second_level_cache: false
        hibernate.cache.use_query_cache: false
        hibernate.generate_statistics: true
        hibernate.dialect: org.hibernate.dialect.PostgreSQL82Dialect

manish:就是这样?

data:
    mongodb:
        uri: mongodb://srv-xxx:27017
        database: xxx
datasources:    
    elser:
        driver-class-name: org.postgresql.Driver
        url: jdbc:postgresql://185.25.114.57:5432/XXX
        username: XXXX
        password: XXXX
    tomcat:
        test-on-borrow:true

最新更新