I'm a backend developer who worked in South Korea.
I'm experiencing a mysql dependency conflict.
I want to use two data sources (DB: mysql) in a spring boot project, but the mysql version is different (one is 5.0 and the other is 8.0).
So, I add a dependency like this in build.gradle.
runtimeOnly("mysql:mysql-connector-java:5.0.4")
runtimeOnly("mysql:mysql-connector-java:8.0.22")
However, if the group and name are the same, Gradle only supports one dependency.
Who could think like this, the MySQL 8.0 connector can connect to the most recent MySQL version, so I verified that the MySQL 8.0 driver can connect to the most recent MySQL version, which is 5.7.
The other method I discovered is that MySQL 5.0 is connected via mysql-connector-java, and MySQL 8.0 is connected via mariadb-java-client.
But I don`t want to solve this problem like this... This is just makeshift.
Please give me another way. Thank you
In Gradle, how do you install multiple versions of the same dependency?