How can we use two datasources in a Springboot project where one datasource will contain camunda schemas and the other will be used for additional application data that are out of scope of Camunda.
From default configuration of Application.yml, spring uses below properties to create and/or use Camunda schemas.
spring:
datasource:
url: …
username: …
password: …
driverClassname: …
Now suppose, I want to create two different datasources, namely, camundaData and applicationData inside my embedded springboot application. The updated yml should look like below -
spring:
datasource:
camundaData:
url: …
username: …
password: …
driverClassName: …
applicationData:
url: …
username: …
password: …
driverClassName: …
Now I can create necessary datasource bean and jdbcTemplate bean for applicationData to have it used by DAO classes inside, to create, store and access application data. But what is the exact way to pass on the information to Spring to use the other datasource, i.e., camundaData for creating and accessing Camunda related data. Is there any specific property that needs to be provided in application.yml to set a specific datasource as camunda datasource among a collection of multiple datasources.