This article shows you how you can connect to an AstraDb database with Jdbc. 1)
Create a new driver with the following properties:
From the Astra DB console:
Create a new connection with the following JDBC URL
jdbc:cassandra://keyspace;DefaultKeyspace=keyspace;AuthMech=2;UID=token;PWD=<ApplicationToken>;SecureConnectionBundlePath=<PATH TO YOUR SECURE CONNECT BUNDLE>;TunableConsistency=6
where:
Example on Idea:
For legacy driver, client id and client secret correspond to username and password. They are created when you generate your application token.