I want to use 2 relational databases(MYSQL) in Camunda Spring boot application one for Camunda fields which starts with “act…” and other one to application use to save the variables. I have added the application.properties to use primary datasource (for Camunda DB) and other for application’s one as below:
#==== Camunda MySQL(primary) ======#
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/camundapoc?useSSL=false
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.properties.hibernate.dialect =org.hibernate.dialect.MySQL5Dialect
camunda.bpm.database.schema-name=camundapoc
#==== Application’s MySQL(secondary) for business use ======#
secondary.datasource.jpa.hibernate.ddl-auto=update
secondary.datasource.datasource.url=jdbc:mysql://localhost:3306/mycamundadb?useSSL=false
secondary.datasource.datasource.username=root
secondary.datasource.datasource.password=root
and added dbconfig file to pick these secondary properties
The real problem occurs when camunda detects both the MYSQL database and loads the camunda tables.But I want it to load in only primary db which is “camundapoc”. Please let me know a way to possibly avoid this problem and I would like JPA to load tables in mycamundadb based on the entities defined. Thanks in advance