MyBatis : Cannot load connection class because of underlying exception: : Malformed database URL, failed to parse the connection string near ‘;characterEncoding=utf8’ 异常解决
产生原因,使用mysql -connector-java-8.0.
修改jdbc url: jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=utf8
为
jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = GMT
异常片段
:
Error querying database. Cause: : Cannot load connection class because of underlying exception: : Malformed database URL, failed to parse the connection string near ‘;characterEncoding=utf8’.
Cause: : Cannot load connection class because of underlying exception: : Malformed database URL, failed to parse the connection string near ‘;characterEncoding=utf8’.
Caused by: : Cannot load connection class because of underlying exception: : Malformed database URL, failed to parse the connection string near ‘;characterEncoding=utf8’.
Caused by: : Cannot load connection class because of underlying exception: : Malformed database URL, failed to parse the connection string near ‘;characterEncoding=utf8’.
Caused by: : Malformed database URL, failed to parse the connection string near ‘;characterEncoding=utf8’.