# Connect a spring app to both Yugabyte and Cassandra cluster

**URL:** https://forum.yugabyte.com/t/connect-a-spring-app-to-both-yugabyte-and-cassandra-cluster/1172
**Category:** General
**Created:** [August 18, 2021, 3:52pm UTC](https://forum.yugabyte.com/t/connect-a-spring-app-to-both-yugabyte-and-cassandra-cluster/1172 "2021-08-18T15:52:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gage](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@Gage](https://forum.yugabyte.com/u/Gage)
#### Post date: [August 18, 2021, 3:52pm UTC](https://forum.yugabyte.com/t/connect-a-spring-app-to-both-yugabyte-and-cassandra-cluster/1172/1 "2021-08-18T15:52:21Z")

</div>

We have a spring application connecting to 2 Cassandra clusters. We need to replace one of the Cassandra cluster with a Yugabyte. Since Yugabyte drivers and Cassandra drivers are the same what is the approach to be taken here for the spring app write to both Yugabyte and Cassandra database.

How to avoid the conflicts between the drivers? Is it possible to keep only Yugabyte driver as dependency use the same to connect to Cassandra cluster too?

---

<div class="post-metadata">

### Author: ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)
#### Post date: [August 29, 2021, 10:45am UTC](https://forum.yugabyte.com/t/connect-a-spring-app-to-both-yugabyte-and-cassandra-cluster/1172/2 "2021-08-29T10:45:33Z")

</div>

Hi @Gage

Note that we have our own forked drivers that you should use with YugabyteDB [GitHub - yugabyte/cassandra-java-driver: YugabyteDB Java Driver for YCQL, based on the DataStax Java Driver](https://github.com/yugabyte/cassandra-java-driver).

> [@Gage](#):
>
> Is it possible to keep only Yugabyte driver as dependency use the same to connect to Cassandra cluster too?

The partitioning function changes between YugabyteDB & Cassandra, so I’d suggest you use the correct driver for each one.
