本周任务
-
消息转换器
-
PostgreSQL学习,JetLinks配置PostgreSQL
问题与总结
JetLinks配置PostgreSQL的时候,启动报错
2023-12-08 09:34:30.478 ERROR 19028 --- [actor-tcp-nio-1] o.h.e.r.e.r.r.R2dbcReactiveSqlExecutor : ==> Error: create table jetlinks.s_file ( "id" varchar(64) not null primary key , "name" varchar(255) not null , "extension" varchar(255) not null , "length" bigint not null , "md5" varchar(32) not null , "sha256" varchar(64) not null , "create_time" bigint not null , "creator_id" varchar(64) , "server_node_id" varchar(64) not null , "storage_path" varchar(512) not null , "options" bigint , "others" text )
io.r2dbc.postgresql.ExceptionFactory$PostgresqlNonTransientResourceException: 模式 "jetlinks" 不存在
at io.r2dbc.postgresql.ExceptionFactory.createException(ExceptionFactory.java:109)
at io.r2dbc.postgresql.ExceptionFactory.createException(ExceptionFactory.java:65)
at io.r2dbc.postgresql.ExceptionFactory.handleErrorResponse(ExceptionFactory.java:132)
at io.r2dbc.postgresql.PostgresqlResult.lambda$getRowsUpdated$0(PostgresqlResult.java:70)
at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:176)
at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:668)
at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:746)
at reactor.core.publisher.FluxWindowPredicate$WindowFlux.onNext(FluxWindowPredicate.java:788)
at reactor.core.publisher.FluxWindowPredicate$WindowPredicateMain.onNext(FluxWindowPredicate.java:239)
at
配置问题:
easyorm:
default-schema: public # pg库public,mysql修改为数据库名
dialect: postgres # 数据库方言,支持 postgres,mysql,h2
PostgreSQL的层级和MySQL的不一样,MySQL创建数据库指的是创建schema。而PostgreSQL比他多一级目录,创建数据库后,有一个默认的schema(public),还可以在下面创建多个schema。
pgAdmin中:
DataGrip中:
下周计划
- 通讯组件文档
- 备考四级