参考halo-dev/halo2787的方式添加gbase8c-jdbc-3.0.0B02.jar驱动后成功编译,但是运行后失败
日志:Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'r2dbcDatabaseClient' defined in class path resource [org/springframework/boot/autoconfigure/r2dbc/ConnectionFactoryDependentConfiguration.class]: Unsatisfied dependency expressed through method 'r2dbcDatabaseClient' parameter 0: Error creating bean with name 'connectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/r2dbc/ConnectionFactoryConfigurations$GenericConfiguration.class]: Failed to instantiate [io.r2dbc.spi.ConnectionFactory]: Factory method 'connectionFactory' threw exception with message: Unable to create a ConnectionFactory for 'ConnectionFactoryOptions{options={database=pg3db, host=127.0.0.1, driver=gbase8c, password=REDACTED, protocol=, port=15400, user=pg2}}'. Available drivers: [ h2, postgresql, mariadb, mysql, pool ]。
配置文件:server:
运行端口
port: 8090
spring:
数据库配置,支持 MySQL、MariaDB、PostgreSQL、H2 Database,具体配置方式可以参考下面的数据库配置
r2dbc:
url: r2dbc:pool:gbase8c://127.0.0.1:15400/db
username: u
password: p
sql:
init:
mode: always
需要配合 r2dbc 的配置进行改动
platform: postgresql
halo:
caches:
page:
是否禁用页面缓存
disabled: true
工作目录位置
work-dir: ${user.home}/.halo2
外部访问地址
external-url: http://localhost:8090
附件映射配置,通常用于迁移场景
attachment:
resource-mappings:
- pathPattern: /upload/**
locations:
- migrate-from-1.x
请问halo现在能不能支持第三方数据库,如果可以那么应该怎么修改呢