Skip to content

PostgreSQL 数据库适配

James 配置修改

James 中涉及数据库配置的配置文件 conf/james-database.properties

调整配置后需 将 PostgreSQL 对应的驱动包放入 lib 文件夹 中,否则启动会报驱动找不到的错

properties
database.driverClassName=org.postgresql.Driver
database.url=jdbc:postgresql://localhost:5432/james?currentSchema=public
database.username=postgres
database.password=111111

vendorAdapter.database=ORACLE

webmail 配置修改

配置文件所在位置 risenet-y9boot-webapp-webmail/src/main/resources/application.yml

yaml
spring:
    datasource:
        druid:
            y9-public:
                driver-class-name: org.postgresql.Driver
                url: jdbc:postgresql://localhost:5432/y9_public?currentSchema=public  
                username: postgres
                password: 111111
            webmail:
                # 连接 james 的库,用于邮箱的管理
                driver-class-name: org.postgresql.Driver
                url: jdbc:postgresql://localhost:5432/james?currentSchema=public
                username: postgres
                password: 111111
    jpa:
        #修改为 PostgreSQL 版本对应的方言
        database-platform: org.hibernate.dialect.PostgreSQLDialect
        properties:
            hibernate:
                #修改为 PostgreSQL 版本对应的方言
                dialect: org.hibernate.dialect.PostgreSQLDialect

Released under the GPL-3.0 License.