💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
```java package com.gosuncn; import java.sql.Connection; import java.sql.Driver; import java.util.Properties; public class ConnectionMain { public static void main(String[] args) throws Exception { Class clazz = Class.forName("com.mysql.jdbc.Driver"); Driver driver = (Driver) clazz.newInstance(); String url = "jdbc:mysql://127.0.0.1:3306/test"; Properties info = new Properties(); info.setProperty("user", "root"); info.setProperty("password", "root"); Connection connect = driver.connect(url, info); System.out.println(connect); } } ```