在我们的应用程序中,数据库是使用 Spring boot starter JPA 和 application.properties 完成的配置 -
spring.datasource.url= postgres
spring.datasource.username=username
spring.datasource.password=password
现在,我想使用 spring data cassandra 的属性在同一应用程序中添加 cassandra 数据库:
spring.data.cassandra.XX
有人可以建议方法,以便我可以连接不同的存储库来连接到任一数据库。
我不想对现有的 JPA 存储库部分进行更改。
有没有办法单独配置 Cassandra 以及如何从同一应用程序连接两个不同的数据库。
我们需要按照以下步骤操作。
这里是使用Mysql和Oracle数据库的工作示例。