如何使用两个连接属性

how to use two connection properties

如何在连接中设置两个属性。

Connection conCreate = DriverManager.getConnection("jdbc:mysql://localhost:3306/rpt"+Globals.comp+"?useUnicode=yes&characterEncoding=UTF-8","root","");

我想在 useUnicode=yes&characterEncoding=UTF-8 旁边设置 rewriteBatchedStatements=true

在字符串末尾附加 & 参数,例如:

Connection conCreate = DriverManager.getConnection("jdbc:mysql://localhost:3306/rpt"+Globals.comp+"?useUnicode=yes&characterEncoding=UTF-8&rewriteBatchedStatements=true","root","");