Postgresql 我可以在同一个数据库中使用不同模式的两个Spring Boot Camunda应用程序吗

Postgresql 我可以在同一个数据库中使用不同模式的两个Spring Boot Camunda应用程序吗,postgresql,spring-boot,camunda,Postgresql,Spring Boot,Camunda,我正在尝试启动两个不同的Spring Boot Camunda应用程序。第一个启动非常好,并创建表和数据库中的所有内容。但是,当我尝试启动第二个应用程序时,它失败了。我只想说清楚,如果有意义的话,我希望应用程序将其模式体验为自己的数据库。启动第二个Spring启动应用程序时出现的错误是: ENGINE-16004 Exception while closing command context: ### Error querying database. Cause: org.postgresq

我正在尝试启动两个不同的Spring Boot Camunda应用程序。第一个启动非常好,并创建表和数据库中的所有内容。但是,当我尝试启动第二个应用程序时,它失败了。我只想说清楚,如果有意义的话,我希望应用程序将其模式体验为自己的数据库。启动第二个Spring启动应用程序时出现的错误是:

ENGINE-16004 Exception while closing command context: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: relation "act_ge_property" does not exist
  Position: 15
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Property.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: org.postgresql.util.PSQLException: ERROR: relation "act_ge_property" does not exist
  Position: 15
我只有一个Postgres数据库,但应用程序使用不同的用户名/密码连接到数据库。他们的用户有自己的模式,并且没有任何权限访问数据库中的其他模式。 两个应用程序都设置了以下应用程序属性:
camunda.bpm.datasource.schema update=true
。 阅读了Camunda上的文档后,我可以看到
.schema update=true
应该创建不存在的表。 我不明白为什么第二个应用程序不创建表

对于Postgres架构配置,我使用以下命令创建它们:

CREATE USER applicationName WITH PASSWORD 'r4nd0m';
CREATE SCHEMA AUTHORIZATION applicationName;
我不知道问题是在于配置Camunda应用程序还是关于模式的权限/创建


任何帮助都将不胜感激

是的,你可以。本项目向您展示了如何配置两个独立的Camunda实例,它们在同一数据库中使用两个单独的模式

基本特性是:

Spring.datasource:
  url: jdbc:postgresql://localhost:5432/postgres?autoReconnect=true
  username: cam1
  password: cam1
  driver-class-name: org.postgresql.Driver
server.port: 8081
server:
  servlet:
    context-path: /cam1
camunda:
  bpm:
    database:
      schema-name: cam1
      table-prefix: cam1.

哪个部分解决了多模式问题?注释或应用程序属性的值?更新了项目以使用具有相同数据库的两个架构。设置模式名和表前缀是重要的部分。您是否能够以某种方式解决这个问题?